[e/emacs] add git clean

This commit is contained in:
Gwenhael Le Moine 2022-06-08 10:07:42 +02:00
parent 114d00b532
commit bdcb005db2
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -40,7 +40,7 @@ REPOSITORY=/home/installs/SlackBuilds/_repositories/$PKGNAM
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@ -50,7 +50,7 @@ fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
if [ -n "${PRINT_PACKAGE_NAME}" ]; then
echo "$PKGNAM-$TARBALLVER-$ARCH-$BUILD.txz"
exit 0
fi
@ -88,6 +88,9 @@ cd $REPOSITORY
git checkout $BRANCH
git pull --all
[ "x$VERSION" == "xtrunk" ] || git checkout $VERSION
git clean -dfX # https://github.com/commercial-emacs/commercial-emacs
[ -e Makefile ] && make distclean
./autogen.sh