Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SPSP
Transfer Tool
Commits
916ae598
Commit
916ae598
authored
Aug 31, 2020
by
Dillenn Terumalai
Browse files
Fixed server address and removed transfer command
parent
4a1cab14
Pipeline
#1358
passed with stage
in 13 minutes and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
spsp
View file @
916ae598
...
...
@@ -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
Supports
Markdown
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