From 6a9f54fd7f6f8a9783289d494f3aa7ce791cb73c Mon Sep 17 00:00:00 2001 From: Antoniu Miclaus Date: Mon, 15 Feb 2021 12:23:36 +0200 Subject: [PATCH] ci: scripts: update env variables Add TOP_DIR environment variable that replaces TravisCI specific VM environment variable. Signed-off-by: Antoniu Miclaus --- ci/travis/lib.sh | 10 +++++----- ci/travis/run_build.sh | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ci/travis/lib.sh b/ci/travis/lib.sh index 98ccfc3..cc366f8 100755 --- a/ci/travis/lib.sh +++ b/ci/travis/lib.sh @@ -1,6 +1,6 @@ #!/bin/bash -TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-'./'} +TOP_DIR=${TOP_DIR:-'./'} command_exists() { local cmd=$1 @@ -31,11 +31,11 @@ ensure_command_exists wget ensure_command_exists sudo # Get the common stuff from no-OS -[ -f ${TRAVIS_BUILD_DIR}/build/lib.sh ] || { - mkdir -p ${TRAVIS_BUILD_DIR}/build +[ -f ${TOP_DIR}/build/lib.sh ] || { + mkdir -p ${TOP_DIR}/build wget https://raw.githubusercontent.com/analogdevicesinc/no-OS/master/ci/travis/lib.sh \ - -O ${TRAVIS_BUILD_DIR}/build/lib.sh + -O ${TOP_DIR}/build/lib.sh } -. ${TRAVIS_BUILD_DIR}/build/lib.sh +. ${TOP_DIR}/build/lib.sh diff --git a/ci/travis/run_build.sh b/ci/travis/run_build.sh index 47e3d29..c883c8a 100755 --- a/ci/travis/run_build.sh +++ b/ci/travis/run_build.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +TOP_DIR="$(pwd)" + sudo apt-get update . ./ci/travis/lib.sh