From 0ef3e75480dc1d0c93a765500292cef76a911b07 Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Wed, 24 Apr 2024 10:22:24 -0700 Subject: [PATCH] Ensure OUTPUT_PATH is defined as a fully qualified path. Signed-off-by: Wade Barnes --- build-scripts/ubuntu-2204/build-3rd-parties.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build-scripts/ubuntu-2204/build-3rd-parties.sh b/build-scripts/ubuntu-2204/build-3rd-parties.sh index 03be8f31e..016ff892f 100755 --- a/build-scripts/ubuntu-2204/build-3rd-parties.sh +++ b/build-scripts/ubuntu-2204/build-3rd-parties.sh @@ -3,10 +3,14 @@ set -e set -x +# Ensure OUTPUT_PATH is defined as a fully qualified path OUTPUT_PATH=${1:-.} +if [ ! -d "${OUTPUT_PATH}" ]; then + mkdir -p ${OUTPUT_PATH} +fi +OUTPUT_PATH=$(realpath ${OUTPUT_PATH}) wheel2debconf="$(dirname "$(realpath "$0")")"/wheel2deb.yml - function build_rocksdb_deb { VERSION=$1 VERSION_TAG="rocksdb-$VERSION" @@ -37,7 +41,6 @@ function build_ioflo_deb { python3 setup.py bdist_wheel pushd dist wheel2deb --config ${wheel2debconf} - mkdir -p ${OUTPUT_PATH} mv output/*.deb ${OUTPUT_PATH} popd @@ -127,7 +130,6 @@ function build_from_pypi_wheel { # Can't build cytoolz using wheel for rlp, but can't build rlp with fpm rm -f /tmp/wheel/cytoolz* wheel2deb --config ${wheel2debconf} - mkdir -p ${OUTPUT_PATH} popd mv /tmp/wheel/output/*.deb ${OUTPUT_PATH} rm -rvf /tmp/wheel @@ -178,4 +180,4 @@ build_from_pypi_wheel six build_from_pypi_wheel sortedcontainers 2.1.0 build_from_pypi_wheel ujson 1.33 -rm -vf ${OUTPUT_PATH}/python3-setuptools*.deb \ No newline at end of file +rm -vf ${OUTPUT_PATH}/python3-setuptools*.deb