Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save H0K5/6528ee0e0cc016cd76f1b1c8c81b7898 to your computer and use it in GitHub Desktop.

Select an option

Save H0K5/6528ee0e0cc016cd76f1b1c8c81b7898 to your computer and use it in GitHub Desktop.

Revisions

  1. Rascagneres Paul created this gist Sep 14, 2018.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    function pop() {
    if [ $(pwd | sed -n -e 's!^/mnt/!!p' | wc -c) == 0 ]
    then
    cmd.exe /c "echo %LOCALAPPDATA%" > /tmp/LOCALAPPDATA
    dest="$(strings -a /tmp/LOCALAPPDATA)\\Packages"
    cmd.exe /c "dir $dest | findstr CanonicalGroupLimited" > /tmp/Canonical
    repo=$(strings -a /tmp/Canonical | awk '{print $NF}')
    root=$(echo "$dest\\$repo\\LocalState\\rootfs")
    explorer.exe $(echo ${root}$(pwd | sed 's!/!\\!g'))
    else
    explorer.exe $(pwd | sed -e 's!/mnt/!!g' -e 's!/!\\!g' -e 's/\(.\)\(.*\)/\1:\2/g')
    fi
    }