Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
SPSP
Transfer Tool
Commits
828ea393
Commit
828ea393
authored
Aug 31, 2020
by
Dillenn Terumalai
🏠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Version 1.6.0 See merge request
!6
parents
4a1cab14
916ae598
Pipeline
#1691
passed with stage
in 13 minutes and 28 seconds
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
spsp
spsp
+3
-14
No files found.
spsp
View file @
828ea393
...
...
@@ -2,7 +2,7 @@
# SPSP transfer-tool is developed and maintained by SIB. For more information, please contact spsp-support@sib.swiss
VERSION
=
"1.
5
.0"
# bumped to support spsp --help, spsp --version
VERSION
=
"1.
6
.0"
# bumped to support spsp --help, spsp --version
# Define colors that are used in the help screen
...
...
@@ -84,12 +84,6 @@ compressFolder() {
tar
-czf
$1
.tar.gz
$1
}
transferFile
()
{
REMOTE_PATH
=
$1
shift
1
# printf "put $@" | sftp -q "${SFTP_URL}$2" 1> /dev/null
for
f
in
$@
;
do
echo
put
"
$f
"
| sftp
-q
-b-
"
${
SFTP_URL
}
$REMOTE_PATH
"
1> /dev/null
;
done
}
hashFile
()
{
$SHACMD
"
$1
"
>
"
$1
"
.sha256
...
...
@@ -448,7 +442,7 @@ autoMode() {
for
FILE
in
*
.
*
;
do
if
[
-f
"
$FILE
"
]
;
then
echo
put
"
$FILE
"
| sftp
-q
-b-
"
${
SFTP_URL
}
/
$BACTERIA
"
1> /dev/null
echo
put
"
$FILE
"
| sftp
-q
-b-
-o
LogLevel
=
QUIET
"
${
SFTP_URL
}
/
$BACTERIA
"
1> /dev/null
((
SUCCESS
=
SUCCESS+1
))
echo
"[
$(
date
+
"%T"
)
] local.SUCCESS:
$FILE
has been successfully transferred to the remote server"
>>
"../../
$LOGFILE
"
if
[[
"
$*
"
==
*
--no-archive
*
]]
||
[[
"
$*
"
==
*
-NA
*
]]
;
then
...
...
@@ -537,7 +531,7 @@ if [ $# -gt 0 ]; then
if
[[
$REPLY
=
~ ^[Yy]
$
]]
then
echo
"ID=
$identifier
"
>
.env
echo
'HOST=spsp
-sftp.vital-it.ch
'
>>
.env
echo
'HOST=spsp
.sib.swiss
'
>>
.env
echo
'SFTP_URL=${ID}@${HOST}:data'
>>
.env
answer
=
true
else
...
...
@@ -576,11 +570,6 @@ if [ $# -gt 0 ]; then
elif
[
"
$1
"
==
"cleanup"
]
;
then
cleanup
exit
0
elif
[
"
$1
"
==
"transfer"
]
;
then
shift
1
transferFile
"
$@
"
exit
0
else
message
=
"Command does not exist, please check the help
\n
${
COL_LGREEN
}
./spsp help
${
COL_RESET
}
"
...
...
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