Home | History | Annotate | Download | only in blueprint
      1 #!/bin/bash
      2 
      3 # Version of ninja to build -- can be any git revision
      4 VERSION="v1.7.1"
      5 
      6 set -ev
      7 
      8 SCRIPT_HASH=$(sha1sum ${BASH_SOURCE[0]} | awk '{print $1}')
      9 
     10 cd ~
     11 if [[ -d ninjabin && "$SCRIPT_HASH" == "$(cat ninjabin/script_hash)" ]]; then
     12   exit 0
     13 fi
     14 
     15 git clone https://github.com/martine/ninja
     16 cd ninja
     17 ./configure.py --bootstrap
     18 
     19 mkdir -p ../ninjabin
     20 rm -f ../ninjabin/ninja
     21 echo -n $SCRIPT_HASH >../ninjabin/script_hash
     22 mv ninja ../ninjabin/
     23