BugLink: http://bugs.launchpad.net/bugs/1584890
Fixes bogus error when run on a remote host, as via maint-startnewrelease:
fatal: Not a git repository (or any of the parent directories): .git
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
rmdir $tmpdir
-# Add the new ABI directory, remove the old
-git add $abidir
-find $DEBIAN/abi/* -maxdepth 0 -type d | grep -v $verfull | while read f; do git rm -r $f;done
+# If this is running in a git repo, add the new ABI directory, remove the old
+if [ -d ".git" ]; then
+ git add $abidir
+ find $DEBIAN/abi/* -maxdepth 0 -type d | grep -v $verfull | while read f; do git rm -r $f;done
+fi