|
@@ -12,8 +12,8 @@ gitcmd() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
overwrite_local() { |
|
|
overwrite_local() { |
|
|
if [ ! -e "$BACKUPS_PATH/$1/$2" ]; then |
|
|
|
|
|
printf "The backup path does not exist\n" |
|
|
|
|
|
|
|
|
if [ ! -e $BACKUPS_PATH/$1/$2 ]; then |
|
|
|
|
|
printf "The backup path $BACKUPS_PATH/$1/$2 does not exist\n" |
|
|
return 1; |
|
|
return 1; |
|
|
fi |
|
|
fi |
|
|
case "$1" in |
|
|
case "$1" in |
|
@@ -21,6 +21,7 @@ overwrite_local() { |
|
|
macros) cp -r "$BACKUPS_PATH/$1/$2" "$HOME/Macros/$2";; |
|
|
macros) cp -r "$BACKUPS_PATH/$1/$2" "$HOME/Macros/$2";; |
|
|
*) invalid_path_msg "$1"; return 1;; |
|
|
*) invalid_path_msg "$1"; return 1;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
printf "local overwrite successful\n" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
overwrite_backup() { |
|
|
overwrite_backup() { |
|
@@ -33,6 +34,7 @@ overwrite_backup() { |
|
|
macros) cp -r "$HOME/Macros/$2" "$BACKUPS_PATH/$1/$2";; |
|
|
macros) cp -r "$HOME/Macros/$2" "$BACKUPS_PATH/$1/$2";; |
|
|
*) invalid_path_msg "$1"; return 1;; |
|
|
*) invalid_path_msg "$1"; return 1;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
printf "backup overwrite successful\n" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
invalid_path_msg() { |
|
|
invalid_path_msg() { |
|
|