Also, remove vcs test, as it's in a code block that already tests that.
if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then
+ if [ -f .metadata ]; then
+ # remove obsolete .metadata file
+ $VCS rm .metadata
+ fi
+
echo "# Generated by etckeeper. Do not edit." > .etckeeper
echo >> .etckeeper
fi
# hg and bzr add not done, they will automatically
# include the file in the current commit
-
- # Finally, VCS remove obsolete .metadata (as long as VCS is set)
- if [ -f .metadata ] && [ "x$VCS" != "x" ]; then
- $VCS rm .metadata
- fi
fi