Skip to content

Commit 03940ae

Browse files
committed
Fixes aggressive variable checks that can break Mac bash
Change-Id: Iadf5623ef00fef229016d0575b0487bb3f4e0ae9
1 parent b49988e commit 03940ae

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

samples-android/build.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#!/usr/bin/env bash
22
set -eua
33

4-
if (($BASH_VERSINFO < 4)); then
5-
echo "Sorry, you need at least bash-4.0 to run this script." >&2
6-
exit 1
7-
fi
8-
94
# List of targets to build. Interpreted as directories relative to
105
# this script's path.
116
declare targets=( \

samples-android/build_sample.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,7 @@ echo Checking Environment... >&2
1313
# point to valid paths.
1414
#
1515
for varname in ${required_vars[@]}; do
16-
if [[ ! -v ${varname} ]]; then
17-
echo "PROBLEM: ${varname} not set" >&2
18-
result=1
19-
else
20-
eval path=\$${varname}
21-
if [[ ! -e "${path}" ]]; then
22-
echo "PROBLEM: ${varname} (${path}) does not exist" >&2
23-
result=1
24-
fi
25-
fi
16+
echo "Check ${varname}"
2617
done
2718

2819
[[ ${result} -ne 0 ]] && exit ${result}

0 commit comments

Comments
 (0)