This commit is contained in:
madmaurice 2015-10-08 09:21:06 +02:00
parent 4071563a9c
commit 1085378130

View file

@ -26,21 +26,31 @@ command_add() {
ln -s "$DOTFILES_DIR/$savepoint" "$file"
cd $DOTFILES_DIR
git add "$savepoint"
git commit -m "Added $savepoint"
echo "$file added in $DOTFILES_DIR/$savepoint"
}
command_echo() {
echo Dotfiles echo: $@
command_sync() {
cd $DOTFILES_DIR
git push; git pull
}
command_help() {
echo "diff -- Show diffs"
echo "commit [message] -- Add all files and commit"
echo "status -- Show status"
echo "add [file] [savepoint] -- Add file to dotfiles at savepoint, create symlink and add"
echo "sync -- push and pull"
}
CMD=$1
shift
case "$CMD" in
diff|commit|add|echo|status)
diff|commit|add|status|sync|help)
command_$CMD $@
;;
*)
echo "Command $CMD not found."
command_help
;;
esac