Skip to content

Commit 8ffef13

Browse files
hisergiorojaslgritz
authored andcommitted
build: Fix buld_ninja.bash to make directories and download correctly (AcademySoftwareFoundation#4192)
Signed-off-by: Sergio Rojas <sergiorojasava@gmail.com>
1 parent a616f93 commit 8ffef13

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/build-scripts/build_ninja.bash

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ NINJA_VERSION=${NINJA_VERSION:=1.10.2}
1414
NINJA_BRANCH=${NINJA_BRANCH:=v${NINJA_VERSION}}
1515
NINJA_INSTALL_DIR=${NINJA_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist/bin}
1616

17-
if [ ! -f $DOWNLOADS_DIR/ninja-${NINJA_VERSION}.zip ]; then
18-
curl --location ${NINJA_REPO}/archive/${NINJA_BRANCH}.tar.gz -o $DOWNLOADS_DIR/ninja-${NINJA_BRANCH}.tar.gz
17+
mkdir -p "$DOWNLOADS_DIR"
18+
19+
# Check if the tar exist, download it if not
20+
if [ ! -f $DOWNLOADS_DIR/ninja-v${NINJA_VERSION}.tar.gz ]; then
21+
curl --location ${NINJA_REPO}/archive/refs/tags/${NINJA_BRANCH}.tar.gz -o $DOWNLOADS_DIR/ninja-${NINJA_BRANCH}.tar.gz
1922
fi
2023

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

0 commit comments

Comments
 (0)