cd ../
[ -d admin ] || die "Could not locate admin directory"
-if [ -d .git ]; then
+if [ -d .bzr ]; then
+ vcs=bzr
+elif [ -d .git ]; then
vcs=git
else
die "Cannot determine vcs"
modified=$(status $basegen) || die
+ ## bzr status output is always relative to top-level, not PWD.
+ [ "$vcs" = "bzr" ] && cd $oldpwd
+
commit "generated" $modified || die "commit error"
exit 0
## It probably would be fine to just check+commit lisp/, since
## making autoloads should not effect any other files. But better
## safe than sorry.
-modified=$(status $genfiles $ldefs_out) || die
+modified=$(status $genfiles ${ldefs_out#lisp/}) || die
+
+
+## bzr status output is always relative to top-level, not PWD.
+[ "$vcs" = "bzr" ] && cd ../
commit "loaddefs" $modified || die "commit error"