From 5fc24163c2baa06d6a099a21cfb24483931de128 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 22 Sep 2021 16:18:29 +0200 Subject: [PATCH] [fd] compile latest tag by default instead of trunk --- ap/fd/SlackBuild | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ap/fd/SlackBuild b/ap/fd/SlackBuild index 53edbac7..15a54e0c 100755 --- a/ap/fd/SlackBuild +++ b/ap/fd/SlackBuild @@ -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