platform_build_blueprint/.travis.install-ninja.sh
Dan Willemsen 5c43e07937 Support implicit outputs
Added in Ninja 1.7, for outputs that will not show up in $out.
2016-10-31 17:36:49 -07:00

22 lines
445 B
Bash
Executable file

#!/bin/bash
# Version of ninja to build -- can be any git revision
VERSION="v1.7.1"
set -ev
SCRIPT_HASH=$(sha1sum ${BASH_SOURCE[0]} | awk '{print $1}')
cd ~
if [[ -d ninjabin && "$SCRIPT_HASH" == "$(cat ninjabin/script_hash)" ]]; then
exit 0
fi
git clone https://github.com/martine/ninja
cd ninja
./configure.py --bootstrap
mkdir -p ../ninjabin
rm -f ../ninjabin/ninja
echo -n $SCRIPT_HASH >../ninjabin/script_hash
mv ninja ../ninjabin/