summary refs log tree commit diff
path: root/contrib/scripts/nm-copr-build.sh
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2026-07-03 19:53:18 +0200
committerMichael Biebl <biebl@debian.org>2026-07-03 19:53:18 +0200
commit537bfce2bda471c92caabd388589230200891509 (patch)
treeaedeccfaf0ba52c238ecf51fc009c0db5d4b60f0 /contrib/scripts/nm-copr-build.sh
parent869e9027026cdbb15d4e4a6327ff41d2697858eb (diff)
New upstream version 1.58~rc1 upstream/1.58_rc1
Diffstat (limited to 'contrib/scripts/nm-copr-build.sh')
-rwxr-xr-xcontrib/scripts/nm-copr-build.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/scripts/nm-copr-build.sh b/contrib/scripts/nm-copr-build.sh
index 93dcc083..0fdfdf6c 100755
--- a/contrib/scripts/nm-copr-build.sh
+++ b/contrib/scripts/nm-copr-build.sh
@@ -74,9 +74,13 @@ get_nm_git_bundle() {
     fi
     mkdir nm-git-bundle
     pushd nm-git-bundle
-    time curl "$NM_GIT_BUNDLE" \
-      | rpm2cpio - \
-      | cpio -idmv
+    if ! time curl --fail -o nm-git-bundle.rpm "$NM_GIT_BUNDLE"; then
+        # The bundle is only a fetch speed-up; fall back to the git fetch below.
+        echo "nm-git-bundle unavailable at $NM_GIT_BUNDLE, falling back to upstream git fetch" >&2
+        popd
+        return 0
+    fi
+    rpm2cpio nm-git-bundle.rpm | cpio -idmv
     popd
     git remote add nm-git-bundle "$PWD/nm-git-bundle/usr/share/NetworkManager/nm-git-bundle.git"
     git fetch nm-git-bundle