Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit b772079

Browse files
chalinkwalrath
authored andcommitted
chore(install): fix install scripts & improve local usage (#2041)
Fix a few minor problems with Travis install & build scripts. Other changes allow `before-install.sh` to be run locally.
1 parent 7075cdb commit b772079

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

scripts/before-install.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
set -e -o pipefail
44

5-
./scripts/env-info-and-check.sh
5+
[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh
6+
[[ -n "$TRAVIS" ]] && . ./scripts/env-info-and-check.sh
67

7-
if [[ 0 ]]; then
8-
# Doesn't seem to be necessary. Disabling.
9-
travis_fold start install.globals
8+
if [ -z "$TRAVIS" ]; then
109
set -x
1110
npm install -g gulp --no-optional
1211
set +x
13-
travis_fold end install.globals
1412
fi

scripts/env-info-and-check.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -e -o pipefail
44

5+
[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh
6+
57
travis_fold start env_info
68
echo ENVIRONMENT INFO
79
travis_fold start env_info.path
@@ -11,7 +13,7 @@ echo
1113
travis_fold end env_info.path
1214
travis_fold start env_info.home
1315
echo Home: $HOME
14-
ls ~ -la
16+
ls -la ~
1517
echo
1618
travis_fold end env_info.home
1719
travis_fold start env_info.pwd

scripts/env-set.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
if [[ -z "$NGIO_ENV_DEFS" ]]; then
44
export ANSI_YELLOW="\033[33;1m"
55
export ANSI_RESET="\033[0m"
6-
echo -e "${ANSI_YELLOW}Setting environment variables from scripts/env.sh${ANSI_RESET}"
6+
echo -e "${ANSI_YELLOW}Setting environment variables from scripts/env-set.sh${ANSI_RESET} "
77

88
export NGIO_ENV_DEFS=1
99

@@ -12,7 +12,7 @@ if [[ -z "$NGIO_ENV_DEFS" ]]; then
1212

1313
if [ ! $(type -t travis_fold) ]; then
1414
# In case this is being run locally. Turn travis_fold into a noop.
15-
travis_fold () { return; }
15+
travis_fold () { true; }
1616
# Alternative definition:
1717
# travis_fold () { echo -en "travis_fold:${1}:${2}"; }
1818
fi

0 commit comments

Comments
 (0)