Resetting utils subtree.
This commit is contained in:
+4
-1
@@ -13,6 +13,9 @@ done
|
||||
# Prompt the user for their selection
|
||||
read -rp "Select a server by the number ... : " SELECTION
|
||||
|
||||
# Get a port no.:
|
||||
read -rp "Set a port no. .................. : " PORT
|
||||
|
||||
# Validate the selection
|
||||
if [[ $SELECTION -gt 0 && $SELECTION -le ${#SERVERS[@]} ]]; then
|
||||
|
||||
@@ -27,7 +30,7 @@ if [[ $SELECTION -gt 0 && $SELECTION -le ${#SERVERS[@]} ]]; then
|
||||
PROJECT_DIRECTORY=$(basename "$PWD")
|
||||
DESTINATION="$USER@$SELECTED_SERVER://home/$USER/programming/python/$PROJECT_DIRECTORY"
|
||||
echo "Trying to send '$SOURCE' to '$DESTINATION'"
|
||||
rsync -avz --mkpath --progress -e "ssh -p 19991" "$SOURCE" "$DESTINATION"
|
||||
rsync -avz --mkpath --progress -e "ssh -p $PORT" "$SOURCE" "$DESTINATION"
|
||||
|
||||
# Exit with success (assuming that the actual data sending went well):
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user