source:
scripts/get_waf.sh
@
236e2a0
Last change on this file since 236e2a0 was bb07c7e, checked in by , 7 years ago | |
---|---|
|
|
File size: 583 bytes |
Rev | Line | |
---|---|---|
[ee4fc9c] | 1 | #! /bin/bash |
[7858305] | 2 | |
3 | set -e | |
4 | set -x | |
5 | ||
[ee4fc9c] | 6 | WAFVERSION=2.0.1 |
7 | WAFTARBALL=waf-$WAFVERSION.tar.bz2 | |
8 | WAFURL=https://waf.io/$WAFTARBALL | |
[7858305] | 9 | |
[ee4fc9c] | 10 | WAFBUILDDIR=`mktemp -d` |
[7858305] | 11 | |
[ee4fc9c] | 12 | function cleanup () { |
13 | rm -rf $WAFBUILDDIR | |
14 | } | |
15 | ||
16 | trap cleanup SIGINT SIGTERM | |
17 | ||
18 | function buildwaf () { | |
19 | pushd $WAFBUILDDIR | |
20 | ||
21 | ( which wget > /dev/null && wget -qO $WAFTARBALL $WAFURL ) || ( which curl > /dev/null && curl $WAFURL > $WAFTARBALL ) | |
22 | ||
23 | tar xf $WAFTARBALL | |
24 | pushd waf-$WAFVERSION | |
[bb07c7e] | 25 | NOCLIMB=1 python waf-light --tools=c_emscripten $* |
[ee4fc9c] | 26 | |
27 | popd | |
28 | popd | |
29 | ||
30 | cp -prv $WAFBUILDDIR/waf-$WAFVERSION/waf $PWD | |
31 | ||
32 | chmod +x waf | |
33 | } | |
34 | ||
35 | buildwaf | |
36 | ||
37 | cleanup |
Note: See TracBrowser
for help on using the repository browser.