Forked from rootbsd/gist:d7af9123684d35fcca566e9c4a8f3593
Created
September 22, 2018 00:13
-
-
Save H0K5/6528ee0e0cc016cd76f1b1c8c81b7898 to your computer and use it in GitHub Desktop.
Revisions
-
Rascagneres Paul created this gist
Sep 14, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 }