Use find for exchange/merchant tarball detection to avoid glob failures

This commit is contained in:
nocci 2025-12-12 13:39:45 +00:00
parent 196040d595
commit 1ee4dc5147

View file

@ -71,8 +71,8 @@ RUN set -e; \
# Exchange
EXCHANGE_DIR=""; \
EXCHANGE_TAR=0; \
if ls /vendor/taler-exchange*.tar.gz /vendor/exchange*.tar.gz >/dev/null 2>&1; then \
LOCAL_TARBALL="$(ls /vendor/taler-exchange*.tar.gz /vendor/exchange*.tar.gz 2>/dev/null | head -1)"; \
LOCAL_TARBALL="$(find /vendor -maxdepth 1 \( -name 'taler-exchange*.tar.gz' -o -name 'exchange*.tar.gz' \) | head -1)"; \
if [ -n "${LOCAL_TARBALL}" ]; then \
echo "Using local Exchange tarball from ${LOCAL_TARBALL}"; \
mkdir -p /src && cd /src; \
cp "${LOCAL_TARBALL}" exchange.tar.gz; \
@ -117,8 +117,8 @@ RUN set -e; \
cd "${EXCHANGE_DIR}" && env GNUNET_PREFIX=/usr GIT_CONFIG_NOSYSTEM=1 GIT_DIR= GIT_WORK_TREE=. ./configure --prefix=/usr && make -j$(nproc) && make install; \
# Merchant
MERCHANT_DIR=""; MERCHANT_TAR=0; \
if ls /vendor/taler-merchant*.tar.gz /vendor/merchant*.tar.gz >/dev/null 2>&1; then \
LOCAL_TARBALL="$(ls /vendor/taler-merchant*.tar.gz /vendor/merchant*.tar.gz 2>/dev/null | head -1)"; \
LOCAL_TARBALL="$(find /vendor -maxdepth 1 \( -name 'taler-merchant*.tar.gz' -o -name 'merchant*.tar.gz' \) | head -1)"; \
if [ -n "${LOCAL_TARBALL}" ]; then \
echo "Using local Merchant tarball from ${LOCAL_TARBALL}"; \
mkdir -p /src && cd /src; \
cp "${LOCAL_TARBALL}" merchant.tar.gz; \