From: Kamal Mostafa Date: Mon, 23 May 2016 17:29:56 +0000 (-0700) Subject: UBUNTU: [debian] getabis: Only git add $abidir if running in local repo X-Git-Tag: Ubuntu-4.10.0-9.11~512 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=dfcb78f37b001b49e64be6a0548fc6c584b2271e;p=mirror_ubuntu-zesty-kernel.git UBUNTU: [debian] getabis: Only git add $abidir if running in local repo 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 Acked-by: Tim Gardner Acked-by: Stefan Bader --- diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis index b6db413695e2..81c114f60d2c 100755 --- a/debian/scripts/misc/getabis +++ b/debian/scripts/misc/getabis @@ -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