]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
dmaketgz: only run 'make distclean' if Makefile exists
authorDaniel Stenberg <daniel@haxx.se>
Fri, 2 Aug 2024 07:16:31 +0000 (09:16 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 2 Aug 2024 21:05:41 +0000 (23:05 +0200)
... so that we can avoid the build failure if we run this in a clean
checkout.

Also remove -it from the docker invoke since it is not interactive and
it needs no TTY. They made the job fail in the CI.

scripts/dmaketgz

index 25874793b3df820bc968039dfc1ae81c230e1a5d..88efb1c0f585b2aee9233a4a1646b169aa36591f 100755 (executable)
@@ -30,20 +30,22 @@ set -eu
 version="${1:-}"
 
 if [ -z "$version" ]; then
-  echo "Specify a version number!"
-  exit
+    echo "Specify a version number!"
+    exit
 fi
 
 timestamp="${2:-$(date -u +%s)}"
 
-make distclean
+if test -f Makefile; then
+    make distclean
+fi
 docker build \
        --build-arg SOURCE_DATE_EPOCH="$timestamp" \
        --build-arg UID="$(id -u)" \
        --build-arg GID="$(id -g)" \
        -t curl/curl .
 
-docker run --rm -it -u "$(id -u):$(id -g)" \
+docker run --rm -u "$(id -u):$(id -g)" \
        -v "$(pwd):/usr/src" -w /usr/src curl/curl sh -c "
   set -e
   autoreconf -fi