Compare commits

..

2 commits

Author SHA1 Message Date
Gwenhael Le Moine
4de37ef73b
Merge branch 'main' of ssh://src.le-moine.org:38172/gwh/slackbuilds 2024-12-03 15:26:48 +01:00
Gwenhael Le Moine
fd79d38ad2
[emacs] add BRANCH, defaults to master, use emacs-30 for example
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2024-12-03 15:26:40 +01:00

View file

@ -79,6 +79,7 @@ if [ -z "$ARCH" ]; then
export ARCH export ARCH
fi fi
BRANCH=${BRANCH:-master}
VERSION=${VERSION:-latest} VERSION=${VERSION:-latest}
PREFIX=${PREFIX:-/usr} PREFIX=${PREFIX:-/usr}
@ -100,9 +101,12 @@ git clean -dfX # https://github.com/commercial-emacs/commercial
cp -R "$REPOSITORY" "$TMP/${PKGNAM}" cp -R "$REPOSITORY" "$TMP/${PKGNAM}"
cd "$TMP/${PKGNAM}" || exit 1 cd "$TMP/${PKGNAM}" || exit 1
git checkout "$BRANCH"
git pull
case $VERSION in case $VERSION in
trunk) 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) latest)
VERSION=$(git tag --sort=-version:refname | head -n1) VERSION=$(git tag --sort=-version:refname | head -n1)