Last active
December 26, 2017 13:56
Revisions
-
heralight revised this gist
Dec 26, 2017 . No changes.There are no files selected for viewing
-
heralight renamed this gist
Dec 26, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
heralight revised this gist
Dec 26, 2017 . 1 changed file with 32 additions and 0 deletions.There are no files selected for viewing
This file contains 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,32 @@ tabargs=( "$@" ) firstFile="$1" directory=$(dirname "$1") cd "$directory" zipFileName=`basename "$firstFile"` DATE=`date '+%Y%m%d_%H%M%S'` zipFileName=${DATE}_${zipFileName}.zip echo $zipFileName echo $directory what="" function relpath() { python -c "import os,sys;print(os.path.relpath(*(sys.argv[1:])))" "$@"; } for word in "${tabargs[@]}"; do what="${what} \"$(relpath "${word}")\""; done action="zip \"${zipFileName}\" \ $what \ -x */.DS_Store \ -x */.git \ -x */.svn \ -x */.idea \ -X */__MACOSX" echo $action eval $action -
heralight created this gist
Dec 26, 2017 .There are no files selected for viewing
This file contains 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,8 @@ for f do echo "$f" dest="${f}.ext" cmd="/Applications/Keka.app/Contents/Resources/keka7z -y -o\"${dest}\" x \"${f}\"" echo $cmd eval $cmd done