feature/cnnfeature/crepefix/ffmpeg5
Last change
on this file since 3e94f77e was
b540b22,
checked in by Paul Brossier <piem@piem.org>, 3 years ago
|
[waf] fetch public key matching requested waf version (closes gh-340)
|
-
Property mode set to
100755
|
File size:
1017 bytes
|
Line | |
---|
1 | #! /usr/bin/env bash |
---|
2 | |
---|
3 | set -e |
---|
4 | #set -x |
---|
5 | |
---|
6 | WAFVERSION=2.0.23 |
---|
7 | WAFTARBALL=waf-$WAFVERSION.tar.bz2 |
---|
8 | WAFURL=https://waf.io/$WAFTARBALL |
---|
9 | WAFUPSTREAMKEY=https://gitlab.com/ita1024/waf/-/raw/waf-$WAFVERSION/utils/pubkey.asc |
---|
10 | |
---|
11 | WAFBUILDDIR=`mktemp -d` |
---|
12 | |
---|
13 | function cleanup () { |
---|
14 | rm -rf $WAFBUILDDIR |
---|
15 | } |
---|
16 | |
---|
17 | trap cleanup SIGINT SIGTERM |
---|
18 | |
---|
19 | function download () { |
---|
20 | ( [[ -n `which wget` ]] && wget -qO $1 $2 ) || ( [[ -n `which curl` ]] && curl -so $1 $2 ) |
---|
21 | } |
---|
22 | |
---|
23 | function checkwaf () { |
---|
24 | download $WAFTARBALL.asc $WAFURL.asc |
---|
25 | if [[ -z `which gpg` ]] |
---|
26 | then |
---|
27 | echo "Warning: gpg not found, not verifying signature for $WAFTARBALL" |
---|
28 | else |
---|
29 | download - $WAFUPSTREAMKEY | gpg --import |
---|
30 | gpg --verify $WAFTARBALL.asc || exit 1 |
---|
31 | fi |
---|
32 | } |
---|
33 | |
---|
34 | function fetchwaf () { |
---|
35 | download $WAFTARBALL $WAFURL |
---|
36 | checkwaf |
---|
37 | } |
---|
38 | |
---|
39 | function buildwaf () { |
---|
40 | tar xf $WAFTARBALL |
---|
41 | pushd waf-$WAFVERSION |
---|
42 | NOCLIMB=1 python waf-light --tools=c_emscripten $* |
---|
43 | popd |
---|
44 | } |
---|
45 | |
---|
46 | pushd $WAFBUILDDIR |
---|
47 | fetchwaf |
---|
48 | buildwaf |
---|
49 | popd |
---|
50 | |
---|
51 | cp -prv $WAFBUILDDIR/waf-$WAFVERSION/waf "$PWD" |
---|
52 | chmod +x waf |
---|
53 | |
---|
54 | cleanup |
---|
Note: See
TracBrowser
for help on using the repository browser.