Skip to content

Commit

Permalink
build: Fix buld_ninja.bash to make directories and download correctly (
Browse files Browse the repository at this point in the history
…#4192)


Signed-off-by: Sergio Rojas <[email protected]>
  • Loading branch information
hisergiorojas committed Mar 20, 2024
1 parent e37edb3 commit 8707881
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/build-scripts/build_ninja.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ NINJA_VERSION=${NINJA_VERSION:=1.10.2}
NINJA_BRANCH=${NINJA_BRANCH:=v${NINJA_VERSION}}
NINJA_INSTALL_DIR=${NINJA_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist/bin}

if [ ! -f $DOWNLOADS_DIR/ninja-${NINJA_VERSION}.zip ]; then
curl --location ${NINJA_REPO}/archive/${NINJA_BRANCH}.tar.gz -o $DOWNLOADS_DIR/ninja-${NINJA_BRANCH}.tar.gz
mkdir -p "$DOWNLOADS_DIR"

# Check if the tar exist, download it if not
if [ ! -f $DOWNLOADS_DIR/ninja-v${NINJA_VERSION}.tar.gz ]; then
curl --location ${NINJA_REPO}/archive/refs/tags/${NINJA_BRANCH}.tar.gz -o $DOWNLOADS_DIR/ninja-${NINJA_BRANCH}.tar.gz
fi

tar xf $DOWNLOADS_DIR/ninja-${NINJA_BRANCH}.tar.gz
Expand Down

0 comments on commit 8707881

Please sign in to comment.