From 9de9ccefd429dc6d6e2b89ea449674851dc05775 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Wed, 5 Jan 2022 23:23:54 +0100 Subject: [PATCH] Fix server paths --- Training/train.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Training/train.sh b/Training/train.sh index e35a51c..b313c0b 100644 --- a/Training/train.sh +++ b/Training/train.sh @@ -27,7 +27,7 @@ ########### PATHS ###################################################################### -WORK_DIR="/Users/imac/Projects/CapCollectorData" +WORK_DIR="~/Projects/CapCollectorServer/Training" BACKUP_DIR="${WORK_DIR}/backup" IMAGE_DIR="${WORK_DIR}/images" VERSION_FILE="${WORK_DIR}/classifier.version" @@ -41,6 +41,7 @@ SERVER_ROOT_PATH="/data/public/capserver" ######################################################################################## echo "[INFO] Working in directory ${WORK_DIR}" +cd ${WORK_DIR} echo "[INFO] Getting classifier version from server..." scp -P $SSH_PORT ${SERVER}:/${SERVER_ROOT_PATH}/classifier.version $WORK_DIR @@ -96,7 +97,7 @@ if [ $retVal -ne 0 ]; then fi echo "[INFO] Moving files into public directory..." -ssh -p ${SSH_PORT} ${SERVER} "sudo mv /home/pi/classifier.* ${SERVER_ROOT_PATH}/" +ssh -p ${SSH_PORT} ${SERVER} "sudo mv /home/pi/classifier.* ${SERVER_ROOT_PATH}" retVal=$? if [ $retVal -ne 0 ]; then @@ -105,7 +106,7 @@ if [ $retVal -ne 0 ]; then fi echo "[INFO] Updating permissions..." -ssh -p ${SSH_PORT} ${SERVER} "sudo chown -R www-data\:www-data ${SERVER_ROOT_PATH}/" +ssh -p ${SSH_PORT} ${SERVER} "sudo chown -R www-data\:www-data ${SERVER_ROOT_PATH}" retVal=$? if [ $retVal -ne 0 ]; then