Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
c36474b7
Commit
c36474b7
authored
Feb 09, 2017
by
Ilyes Kechidi
Browse files
modified the script to use tar command instead of zip
parent
6cefe70f
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/transfer/transfer.plugin.zsh
View file @
c36474b7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment