dots/.bin/dots.bak

15 lines
282 B
Bash
Executable File

#!/bin/bash
cmd="git --git-dir=$HOME/.dots/ --work-tree=$HOME"
case $1 in
update)
$cmd commit -m "Update dotfiles"; exit ;;
lock)
shift; cmd="$cmd update-index --assume-unchanged" ;;
unlock)
shift; cmd="$cmd update-index --no-assume-unchanged" ;;
*) ;;
esac
$cmd "$@"