From fd79d38ad2affde48a16b9d2d69bff0cf3eedeb1 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 3 Dec 2024 15:26:40 +0100 Subject: [PATCH] [emacs] add BRANCH, defaults to master, use emacs-30 for example Signed-off-by: Gwenhael Le Moine --- e/emacs/SlackBuild | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e/emacs/SlackBuild b/e/emacs/SlackBuild index c729e9da..89b0a751 100755 --- a/e/emacs/SlackBuild +++ b/e/emacs/SlackBuild @@ -79,6 +79,7 @@ if [ -z "$ARCH" ]; then export ARCH fi +BRANCH=${BRANCH:-master} VERSION=${VERSION:-latest} PREFIX=${PREFIX:-/usr} @@ -100,9 +101,12 @@ git clean -dfX # https://github.com/commercial-emacs/commercial cp -R "$REPOSITORY" "$TMP/${PKGNAM}" cd "$TMP/${PKGNAM}" || exit 1 +git checkout "$BRANCH" +git pull + case $VERSION in trunk) - VERSION="r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" + VERSION="${BRANCH//-/_}_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" ;; latest) VERSION=$(git tag --sort=-version:refname | head -n1)