[SRU TUVWXY][PATCH 1/2] UBUNTU: [debian] getabis: Only git add $abidir if running in local repo
Kamal Mostafa
kamal at canonical.com
Mon May 23 17:29:56 UTC 2016
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 at canonical.com>
---
debian/scripts/misc/getabis | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis
index 4349499..bf4086b 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
--
2.7.4
More information about the kernel-team
mailing list