cd ../
[ -d admin ] || die "Could not locate admin directory"
-if [ -d .bzr ]; then
- vcs=bzr
-elif [ -e .git ]; then
- vcs=git
-else
- die "Cannot determine vcs"
-fi
-
+[ -d .git ] || die "No .git directory"
usage ()
{
## Run status on inputs, list modified files on stdout.
status ()
{
- local statflag="-S"
- [ "$vcs" = "git" ] && statflag="-s"
-
- $vcs status $statflag "$@" >| $tempfile || die "$vcs status error for $@"
+ git status -s "$@" >| $tempfile || die "git status error for $@"
local stat file modified
echo "Committing..."
- $vcs commit -m "; Auto-commit of $type files." "$@" || return $?
+ git commit -m "; Auto-commit of $type files." "$@" || return $?
- [ "$vcs" = "git" ] && {
- ## In case someone else pushed something while we were working.
- $vcs pull --rebase || return $?
- $vcs push || return $?
- }
+ ## In case someone else pushed something while we were working.
+ git pull --rebase || return $?
+ git push || return $?
echo "Committed files: $@"
} # function commit