summaryrefslogtreecommitdiffstats
path: root/system/fdupes/fdupes.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/fdupes/fdupes.SlackBuild')
-rw-r--r--system/fdupes/fdupes.SlackBuild16
1 files changed, 13 insertions, 3 deletions
diff --git a/system/fdupes/fdupes.SlackBuild b/system/fdupes/fdupes.SlackBuild
index 773d032db6..3727d84309 100644
--- a/system/fdupes/fdupes.SlackBuild
+++ b/system/fdupes/fdupes.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for duplicate file finder fdupes.
@@ -29,10 +29,13 @@
# 19/06/2011 - Updated to version 1.50-PR2
# 30/01/2019 - Updated to version 1.6.1, i486 -> i586
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=fdupes
VERSION=${VERSION:-1.6.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -42,7 +45,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}
@@ -99,4 +109,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