diff options
author | Ilyes Kechidi <ilyes.spd@gmail.com> | 2017-02-09 19:41:09 +0100 |
---|---|---|
committer | Ilyes Kechidi <ilyes.spd@gmail.com> | 2017-02-09 19:41:09 +0100 |
commit | c36474b7dfbe19c0628f6f21d8da40b535eeb5fb (patch) | |
tree | d932a318cc3429ac216ac1759b0c8b325ec300f4 /plugins/transfer | |
parent | 6cefe70ffc8f5d827a9b4341129114a843ceb248 (diff) | |
download | zsh-c36474b7dfbe19c0628f6f21d8da40b535eeb5fb.tar.gz zsh-c36474b7dfbe19c0628f6f21d8da40b535eeb5fb.tar.bz2 zsh-c36474b7dfbe19c0628f6f21d8da40b535eeb5fb.zip |
modified the script to use tar command instead of zip
Diffstat (limited to 'plugins/transfer')
-rw-r--r-- | plugins/transfer/transfer.plugin.zsh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/transfer/transfer.plugin.zsh b/plugins/transfer/transfer.plugin.zsh index 796faa9a2..7a7cd85ec 100644 --- a/plugins/transfer/transfer.plugin.zsh +++ b/plugins/transfer/transfer.plugin.zsh @@ -9,6 +9,7 @@ # Author: # Remco Verhoef <remco@dutchcoders.io> # https://gist.github.com/nl5887/a511f172d3fb3cd0e42d +# Modified to use tar command instead of zip # curl --version 2>&1 > /dev/null @@ -43,11 +44,12 @@ transfer() { if [ -d $file ]; then - # zip directory and transfer - zipfile=$( mktemp -t transferXXX.zip ) - cd $(dirname $file) && zip -r -q - $(basename $file) >> $zipfile - curl --progress-bar --upload-file "$zipfile" "https://transfer.sh/$basefile.zip" >> $tmpfile - rm -f $zipfile + echo $file + # tar directory and transfer + tarfile=$( mktemp -t transferXXX.tar.gz ) + cd $(dirname $file) && tar -czf $tarfile $(basename $file) + curl --progress-bar --upload-file "$tarfile" "https://transfer.sh/$basefile.tar.gz" >> $tmpfile + rm -f $tarfile else # transfer file curl --progress-bar --upload-file "$file" "https://transfer.sh/$basefile" >> $tmpfile |