History

scripts/get_waf.sh: build waf from source tarball, add emscripten and syms (see #126)

Paul Brossier committed 9 years ago

Commit ee4fc9c1 parent fee00942 files · +31 −25Browse files

Showing the changes to scripts (2 of 2 files). Show all

Unified · Split

2 files
  1. scripts/get_waf.sh +31 −4
  2. scripts/get_waf_emscripten.sh +0 −21
scripts/get_waf.sh+31−4
@@ -1,10 +1,37 @@
1−#! /bin/sh
1+#! /bin/bash
22
33 set -e
44 set -x
55
6−WAFURL=https://waf.io/waf-2.0.1
6+WAFVERSION=2.0.1
7+WAFTARBALL=waf-$WAFVERSION.tar.bz2
8+WAFURL=https://waf.io/$WAFTARBALL
79
8−( which wget > /dev/null && wget -qO waf $WAFURL ) || ( which curl > /dev/null && curl $WAFURL > waf )
10+WAFBUILDDIR=`mktemp -d`
911
10−chmod +x waf
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
25+ NOCLIMB=1 python waf-light --tools=c_emscripten,syms
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
scripts/get_waf_emscripten.sh+0−21
@@ -1,21 +0,0 @@
1−#! /bin/sh
2−
3−set -e
4−set -x
5−
6−SCRIPTPATH=`pwd`/$(dirname "$0")
7−
8−
9−WAFFILE=waf-1.9.13
10−WAFURL=https://waf.io/$WAFFILE.tar.bz2
11−
12−BUILDDIR=$SCRIPTPATH/../.waf-emscripten-dl
13−mkdir -p $BUILDDIR
14−
15−cd $BUILDDIR
16−curl -o $WAFFILE.tar.bz2 $WAFURL
17−tar xjvf $WAFFILE.tar.bz2
18−cd $WAFFILE
19−NOCLIMB=1 ./waf-light --tools=c_emscripten && cp waf $SCRIPTPATH/../
20−
21−rm -r $BUILDDIR

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t