diff --git a/d/wabt/SlackBuild b/d/wabt/SlackBuild index 9c67298a..75cc3634 100755 --- a/d/wabt/SlackBuild +++ b/d/wabt/SlackBuild @@ -4,7 +4,8 @@ CWD=$(pwd) PRGNAM=$(basename $CWD) -VERSION=${VERSION:-"trunk"} +GITHUB_REPO=WebAssembly/wabt +VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases/latest | jq -r .tag_name | sed 's|^null$|trunk|')} # or VERSION=trunk ARCH=${ARCH:-$(uname -m)} BUILD=1 @@ -26,7 +27,7 @@ mkdir -p $PKG # mise en place cd $TMP -[ ! -e $REPOSITORY ] && git clone --recursive https://github.com/WebAssembly/wabt.git $REPOSITORY +[ ! -e $REPOSITORY ] && git clone --recursive https://github.com/${GITHUB_REPO} $REPOSITORY cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION cd $TMP/$PRGNAM-$VERSION @@ -75,7 +76,7 @@ $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: -$PRGNAM: https://github.com/WebAssembly/wabt +$PRGNAM: https://github.com/${GITHUB_REPO} $PRGNAM: EOF