... 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.
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