Commit 828ea393 authored by Dillenn Terumalai's avatar Dillenn Terumalai 🏠

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
......@@ -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}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment