summaryrefslogtreecommitdiffstats
path: root/system/ufiformat
diff options
context:
space:
mode:
Diffstat (limited to 'system/ufiformat')
-rw-r--r--system/ufiformat/ufiformat.SlackBuild16
1 files changed, 13 insertions, 3 deletions
diff --git a/system/ufiformat/ufiformat.SlackBuild b/system/ufiformat/ufiformat.SlackBuild
index 670c9432e0..edac8ac2c9 100644
--- a/system/ufiformat/ufiformat.SlackBuild
+++ b/system/ufiformat/ufiformat.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ufiFormat
# Written by Ben Collver <bencollver@gmail.com>
@@ -7,10 +7,13 @@
# 02 feb 2020 - 0.9.9 build 1 - Updated to 0.9.9. Updated homepage and download links.
# (Bojan)
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=ufiformat
VERSION=${VERSION:-0.9.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -20,7 +23,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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}
@@ -72,4 +82,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE