Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
c36474b7
Commit
c36474b7
authored
Feb 09, 2017
by
Ilyes Kechidi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified the script to use tar command instead of zip
parent
6cefe70f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
transfer.plugin.zsh
plugins/transfer/transfer.plugin.zsh
+7
-5
No files found.
plugins/transfer/transfer.plugin.zsh
View file @
c36474b7
...
@@ -9,6 +9,7 @@
...
@@ -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() {
...
@@ -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
...
...
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