Skip to content

Commit a17bec0

Browse files
committed
Fix building the samples on OS X Mavericks
OS X Mavericks ships an outdated version of Bash which cannot run the build scripts requiring users to install a newer version via MacPorts or Homebrew. Update the shebang lines in the scripts to use Bash from the user's path instead of the binary in /bin. Change-Id: I90e4dabd0fe9b861ab0b57e22848df46c646b1c6
1 parent dc9972b commit a17bec0

File tree

9 files changed

+14
-9
lines changed

9 files changed

+14
-9
lines changed

samples-android/ButtonClicker/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

samples-android/CollectAllTheStarsNative/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

samples-android/Minimalist/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

samples-android/TbmpSkeletonNative/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

samples-android/Teapot/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

samples-android/TrivialQuestNative/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

samples-android/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
#!/bin/bash
1+
#!/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+
49
# List of targets to build. Interpreted as directories relative to
510
# this script's path.
611
declare targets=( \

samples-android/build_sample.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare result=0

samples-android/build_template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -eua
33

44
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

0 commit comments

Comments
 (0)