Changeset e561ca7


Ignore:
Timestamp:
Sep 18, 2018, 1:41:51 AM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
b3146df
Parents:
3a8f0bf
Message:

scripts/get_waf.sh: verify signature if gpg available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/get_waf.sh

    r3a8f0bf re561ca7  
    22
    33set -e
    4 set -x
     4#set -x
    55
    66WAFVERSION=2.0.11
    77WAFTARBALL=waf-$WAFVERSION.tar.bz2
    88WAFURL=https://waf.io/$WAFTARBALL
     9WAFUPSTREAMKEY=https://gitlab.com/ita1024/waf/raw/master/utils/pubkey.asc
    910
    1011WAFBUILDDIR=`mktemp -d`
     
    1617trap cleanup SIGINT SIGTERM
    1718
     19function download () {
     20  ( [[ -n `which wget` ]] && wget -qO $1 $2 ) || ( [[ -n `which curl` ]] && curl -so $1 $2 )
     21}
     22
     23function 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
     34function fetchwaf () {
     35  download $WAFTARBALL $WAFURL
     36  checkwaf
     37}
     38
    1839function buildwaf () {
    19   pushd $WAFBUILDDIR
    20 
    21   ( which wget > /dev/null && wget -qO $WAFTARBALL $WAFURL ) || ( which curl > /dev/null && curl $WAFURL > $WAFTARBALL )
    22 
    2340  tar xf $WAFTARBALL
    2441  pushd waf-$WAFVERSION
    2542  NOCLIMB=1 python waf-light --tools=c_emscripten $*
    26 
    2743  popd
    28   popd
    29 
    30   cp -prv $WAFBUILDDIR/waf-$WAFVERSION/waf $PWD
    31 
    32   chmod +x waf
    3344}
    3445
     46pushd $WAFBUILDDIR
     47fetchwaf
    3548buildwaf
     49popd
     50
     51cp -prv $WAFBUILDDIR/waf-$WAFVERSION/waf $PWD
     52chmod +x waf
    3653
    3754cleanup
Note: See TracChangeset for help on using the changeset viewer.