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