]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: [debian] getabis: Only git add $abidir if running in local repo
authorKamal Mostafa <kamal@canonical.com>
Mon, 23 May 2016 17:29:56 +0000 (10:29 -0700)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
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>
debian/scripts/misc/getabis

index b6db413695e2a4c10337fbc3cca42b94e32f505f..81c114f60d2c68ba431fe6d6162b46e3eff29db3 100755 (executable)
@@ -125,6 +125,8 @@ mv fwinfo.tmp $fwinfo
 
 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