Skip to content

Commit cb0c5c1

Browse files
Ben ChatelainBen Chatelain
authored andcommitted
Just install any missing tools in bootstrap
Now REQUIRED_TOOLS is a mix of commands and libraries
1 parent 39e3beb commit cb0c5c1

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

script/bootstrap

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export SCRIPT_DIR=$(dirname "$0")
99
config ()
1010
{
1111
# A whitespace-separated list of executables that must be present and locatable.
12-
: ${REQUIRED_TOOLS="xctool cmake"}
12+
# These will each be installed through Homebrew if not found.
13+
: ${REQUIRED_TOOLS="xctool cmake libssh2 libtool autoconf automake pkg-config"}
1314

1415
export REQUIRED_TOOLS
1516
}
@@ -45,24 +46,13 @@ main ()
4546

4647
check_deps ()
4748
{
48-
for tool in $REQUIRED_TOOLS
49-
do
50-
which -s "$tool"
51-
if [ "$?" -ne "0" ]
52-
then
53-
echo "*** Error: $tool not found. Please install it and bootstrap again."
54-
exit 1
55-
fi
56-
done
57-
5849
# Ensure that we have libgit2's dependencies installed.
5950
installed=`brew list`
60-
libs="libssh2 libtool autoconf automake pkg-config"
6151

62-
for lib in $libs
52+
for tool in $REQUIRED_TOOLS
6353
do
6454
# Skip packages that are already installed.
65-
echo "$installed" | grep -q "$lib" && code=$? || code=$?
55+
echo "$installed" | grep -q "$tool" && code=$? || code=$?
6656

6757
if [ "$code" -eq "0" ]
6858
then
@@ -72,8 +62,8 @@ check_deps ()
7262
exit $code
7363
fi
7464

75-
echo "*** Installing $lib with Homebrew..."
76-
brew install "$lib"
65+
echo "*** Installing $tool with Homebrew..."
66+
brew install "$tool"
7767
done
7868

7969
brew_prefix=`brew --prefix`

0 commit comments

Comments
 (0)