mirror of
https://github.com/ION606/VCS.git
synced 2026-05-14 22:16:55 +00:00
added status command
This commit is contained in:
@@ -17,7 +17,6 @@ source "$PWD/.ionvcs/src.config"
|
||||
# Set the remote path for rsync
|
||||
REMOTE_PATH="$csrc"
|
||||
|
||||
|
||||
while getopts ":of" opt; do
|
||||
case $opt in
|
||||
f)
|
||||
@@ -26,6 +25,13 @@ while getopts ":of" opt; do
|
||||
esac
|
||||
done
|
||||
|
||||
# Set the destination folder
|
||||
if [ -n "$2" ]; then
|
||||
DEST_FOLDER="$PWD/$2"
|
||||
else
|
||||
DEST_FOLDER="$PWD"
|
||||
fi
|
||||
|
||||
|
||||
# Use rsync with sshpass to check for differences without copying
|
||||
DIFF_OUTPUT=$(/usr/bin/sshpass -p "$password" rsync -avcn --delete -e ssh "$REMOTE_PATH" "$DEST_FOLDER")
|
||||
|
||||
Reference in New Issue
Block a user