about summary refs log tree commit diff
path: root/contrib/fedora/rpm/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/fedora/rpm/build.sh')
-rwxr-xr-xcontrib/fedora/rpm/build.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/fedora/rpm/build.sh b/contrib/fedora/rpm/build.sh
index f46b9ba5..4a89a6b4 100755
--- a/contrib/fedora/rpm/build.sh
+++ b/contrib/fedora/rpm/build.sh
@@ -127,7 +127,7 @@ if [ -n "$SOURCE" ]; then
     [[ "$SOURCE_FROM_GIT" == 1 ]] && die "Cannot set both \$SOURCE and \$SOURCE_FROM_GIT=1"
     SOURCE_FROM_GIT=0
 elif [[ "$SOURCE_FROM_GIT" != "1" ]]; then
-    SOURCE="$(ls -1 "$GITDIR/NetworkManager-${VERSION}.tar."* 2>/dev/null | head -n1)"
+    SOURCE="$(ls -1 "$GITDIR/NetworkManager-${VERSION}.tar."* 2>/dev/null | head -n1 || :)"
     if [[ -z "$SOURCE" ]]; then
         [[ "$SOURCE_FROM_GIT" == "0" ]] && die "Either set \$SOURCE or set \$SOURCE_FROM_GIT=1"
         SOURCE_FROM_GIT=1
@@ -237,7 +237,7 @@ rpmbuild --define "_topdir $TEMP" $RPM_BUILD_OPTION "$TEMPSPEC" $NM_RPMBUILD_ARG
 LS_EXTRA=()
 
 if [ "$SIGN_SOURCE" = 1 ]; then
-    SIGNKEY="$(git config --get user.signingkey)"
+    SIGNKEY="$(git config --get user.signingkey || :)"
     if [ "$SIGNKEY" != "" ]; then
         SIGNKEY="--local-user $(printf '%q' "$SIGNKEY")"
     fi