From 1faff56384dcbed35eaa813b31381c1f27a8f519 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Wed, 10 Jan 2024 08:13:17 +0100 Subject: [PATCH] Updated code based on review --- scripts/build_experimental_archive.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/build_experimental_archive.sh b/scripts/build_experimental_archive.sh index af28b9277..a0d904069 100644 --- a/scripts/build_experimental_archive.sh +++ b/scripts/build_experimental_archive.sh @@ -5,8 +5,12 @@ set -euxo pipefail gitTarget=${1:-"master"} buildDir=${2:-"./build"} +if [ -d "$buildDir" ]; then rm -Rf $buildDir; fi + # Create build directory and navigate into it -mkdir -p "${buildDir}" && cd "${buildDir}" +mkdir -p "${buildDir}" + +cd "${buildDir}" # Clone the repository git clone -v https://github.com/ooni/probe-cli.git @@ -14,11 +18,8 @@ git clone -v https://github.com/ooni/probe-cli.git # Navigate into the repository cd probe-cli -git checkout master - -git pull origin # Checkout the target branch -git checkout -c "${gitTarget}" +git checkout "${gitTarget}" # Build the probe-cli make android