Skip to content

Commit

Permalink
ci: scripts: update env variables
Browse files Browse the repository at this point in the history
Add TOP_DIR environment variable that replaces TravisCI specific VM
environment variable.

Signed-off-by: Antoniu Miclaus <[email protected]>
  • Loading branch information
amiclaus committed Feb 15, 2021
1 parent 615a6a4 commit 6a9f54f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ci/travis/lib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-'./'}
TOP_DIR=${TOP_DIR:-'./'}

command_exists() {
local cmd=$1
Expand Down Expand Up @@ -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

2 changes: 2 additions & 0 deletions ci/travis/run_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e

TOP_DIR="$(pwd)"

sudo apt-get update

. ./ci/travis/lib.sh
Expand Down

0 comments on commit 6a9f54f

Please sign in to comment.