From 63daf9f79a0016bbf3a712a1d1bdcfdcb724fded Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Sun, 4 Jul 2021 12:23:38 +0200 Subject: All: Support $PRINT_PACKAGE_NAME env var Signed-off-by: Heinz Wiesinger --- office/openoffice.org/openoffice.org.SlackBuild | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'office/openoffice.org') diff --git a/office/openoffice.org/openoffice.org.SlackBuild b/office/openoffice.org/openoffice.org.SlackBuild index dbb065b22038..21cc7b7d254a 100644 --- a/office/openoffice.org/openoffice.org.SlackBuild +++ b/office/openoffice.org/openoffice.org.SlackBuild @@ -36,6 +36,7 @@ VERSION=${VERSION:-4.1.7} BUILD_ID=${BUILD_ID:-9800} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCSHORT=$(echo $VERSION | cut -f1 -d.) if [ -z "$ARCH" ]; then @@ -46,6 +47,14 @@ if [ -z "$ARCH" ]; then esac 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 + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -154,4 +163,4 @@ chown -R root:root . find . -type d -exec chmod 755 {} \; chmod -R u+rw,go+r-w,a-s . -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.$PKGTYPE -- cgit v1.2.3