[fd] compile latest tag by default instead of trunk

This commit is contained in:
Gwenhael Le Moine 2021-09-22 16:18:29 +02:00
parent df0ade3b48
commit 5fc24163c2
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -1,7 +1,6 @@
#!/bin/bash
# variables
VERSION=${VERSION:-"trunk"}
BUILD=${BUILD:-1}
TAG=gwh
@ -14,9 +13,13 @@ OUTPUT=${OUTPUT:-/tmp}
ARCH=${ARCH:-$(uname -m)}
GITHUB_REPO=sharkdp/fd
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
PREFIX=${PREFIX:-/usr}
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases/latest | jq -r .tag_name)} # or VERSION=trunk
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
@ -24,7 +27,7 @@ mkdir -p $PKG
# mise en place
cd $TMP
[ ! -e $REPOSITORY ] && git clone https://github.com/sharkdp/fd.git $REPOSITORY
[ ! -e $REPOSITORY ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORY
cd $REPOSITORY
git pull --all