mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
modified the script to use tar command instead of zip
This commit is contained in:
parent
6cefe70ffc
commit
c36474b7df
1 changed files with 7 additions and 5 deletions
|
@ -9,6 +9,7 @@
|
||||||
# Author:
|
# Author:
|
||||||
# Remco Verhoef <remco@dutchcoders.io>
|
# Remco Verhoef <remco@dutchcoders.io>
|
||||||
# https://gist.github.com/nl5887/a511f172d3fb3cd0e42d
|
# https://gist.github.com/nl5887/a511f172d3fb3cd0e42d
|
||||||
|
# Modified to use tar command instead of zip
|
||||||
#
|
#
|
||||||
|
|
||||||
curl --version 2>&1 > /dev/null
|
curl --version 2>&1 > /dev/null
|
||||||
|
@ -43,11 +44,12 @@ transfer() {
|
||||||
|
|
||||||
if [ -d $file ];
|
if [ -d $file ];
|
||||||
then
|
then
|
||||||
# zip directory and transfer
|
echo $file
|
||||||
zipfile=$( mktemp -t transferXXX.zip )
|
# tar directory and transfer
|
||||||
cd $(dirname $file) && zip -r -q - $(basename $file) >> $zipfile
|
tarfile=$( mktemp -t transferXXX.tar.gz )
|
||||||
curl --progress-bar --upload-file "$zipfile" "https://transfer.sh/$basefile.zip" >> $tmpfile
|
cd $(dirname $file) && tar -czf $tarfile $(basename $file)
|
||||||
rm -f $zipfile
|
curl --progress-bar --upload-file "$tarfile" "https://transfer.sh/$basefile.tar.gz" >> $tmpfile
|
||||||
|
rm -f $tarfile
|
||||||
else
|
else
|
||||||
# transfer file
|
# transfer file
|
||||||
curl --progress-bar --upload-file "$file" "https://transfer.sh/$basefile" >> $tmpfile
|
curl --progress-bar --upload-file "$file" "https://transfer.sh/$basefile" >> $tmpfile
|
||||||
|
|
Loading…
Reference in a new issue