Skip to content

Instantly share code, notes, and snippets.

@Voker57
Created December 6, 2009 10:32
Show Gist options
  • Save Voker57/250151 to your computer and use it in GitHub Desktop.
Save Voker57/250151 to your computer and use it in GitHub Desktop.
#!/usr/bin/zsh
# Simple ADOM savegame backuper
# Usage: ./aadom.zsh <savename>
# Requires git and ADOM in $PATH
cd /$HOME/.adom.data/savedg
if [ ! -d .git ]; then
git init
fi
while [ true ]
do
echo "[acCrRe] [a]dom, [c]ommit (C - default msg and launch ADOM), revert (R - and launch ADOM), Exit?"
read -k 1 -- input
case $input in
"a") adom -L $1;;
"c") git add *.svg && git commit;;
"C") git add *.svg && git commit -m "I was in too much of hurry to edit this message" && adom -L $1;;
"R") git reset --hard && adom -L $1;;
"r") git reset --hard;;
"e") exit;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment