Skip to content

Commit

Permalink
Exit on unknown arg in savedata
Browse files Browse the repository at this point in the history
  • Loading branch information
norm committed May 11, 2021
1 parent 3a156a8 commit b16c7fe
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions bin/savedata
Expand Up @@ -16,11 +16,18 @@ dryrun=''
[ -n "${DRY_RUN:-}" ] && dryrun='-n'

case "$1" in
backup) rsync $dryrun -avP /Volumes/$USB_DRIVE/$USB_DIR/. saves/$2/.
git add saves/$2
;;
restore) rsync $dryrun -avP saves/$2/. /Volumes/$USB_DRIVE/$USB_DIR/.
;;
list) ls -l saves
;;
backup)
rsync $dryrun -avP /Volumes/$USB_DRIVE/$USB_DIR/. saves/$2/.
git add saves/$2
;;
restore)
rsync $dryrun -avP saves/$2/. /Volumes/$USB_DRIVE/$USB_DIR/.
;;
list)
ls -l saves
;;
*)
echo Unknown argument: "$1"
exit 2
;;
esac

0 comments on commit b16c7fe

Please sign in to comment.