Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :<<!
- @ECHO OFF
- SETLOCAL ENABLEDELAYEDEXPANSION
- CALL :mnt "%~0" this
- CALL :mnt "%~1" that
- bash %this% %that%
- EXIT /B
- :mnt
- SET d=%~d1
- SET d=%d:~0,-1%
- FOR %%I IN (a b c d e f g h i j k l m n o p q r s t u v w x y z) DO SET d=!d:%%I=%%I!
- SET "pnx=%~pnx1"
- SET "pnx=%pnx:\=/%"
- SET %2="/mnt/%d%%pnx%"
- EXIT /B
- !
- w() {
- for n in "$@"; do
- echo "'$n' '*/$n'"
- done
- }
- if [ -d "$1" ]; then
- pushd "$1" > /dev/null
- eval zip -0 -D -r '"../${PWD##*/}.zip"' . -x `w .DS_Store desktop.ini Thumbs.db`
- popd > /dev/null
- fi
Add Comment
Please, Sign In to add comment