|
|
@@ -11,6 +11,19 @@ gitcmd() { |
|
|
|
printf "The command succeded\n" |
|
|
|
} |
|
|
|
|
|
|
|
bdiff() { |
|
|
|
check_args $# 2 |
|
|
|
if [ ! -d "$BACKUPS_PATH/$1" ]; then |
|
|
|
invalid_path_msg "$1" |
|
|
|
return 1; |
|
|
|
fi |
|
|
|
case "$1" in |
|
|
|
configs) vimdiff "$BACKUPS_PATH/$1/$2" "$XDG_CONFIG_HOME/$2";; |
|
|
|
macros) vimdiff "$BACKUPS_PATH/$1/$2" "$HOME/Macros/$2";; |
|
|
|
*) invalid_path_msg "$1"; return 1;; |
|
|
|
esac |
|
|
|
} |
|
|
|
|
|
|
|
overwrite_local() { |
|
|
|
if [ ! -e $BACKUPS_PATH/$1/$2 ]; then |
|
|
|
printf "The backup path $BACKUPS_PATH/$1/$2 does not exist\n" |
|
|
@@ -60,5 +73,6 @@ case "$1" in |
|
|
|
overwrite-backup) overwrite_backup $2 $3;; |
|
|
|
gitcmd) gitcmd "$2" "$3";; |
|
|
|
push-backup) overwrite_backup $2 $3;; |
|
|
|
bdiff) bdiff $2 "$3";; |
|
|
|
*) printf "No such option\n";; |
|
|
|
esac |