summaryrefslogtreecommitdiffstats
path: root/desktop/screenfetch/screenfetch.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/screenfetch/screenfetch.SlackBuild')
-rw-r--r--desktop/screenfetch/screenfetch.SlackBuild16
1 files changed, 13 insertions, 3 deletions
diff --git a/desktop/screenfetch/screenfetch.SlackBuild b/desktop/screenfetch/screenfetch.SlackBuild
index 65e62b6eb5..4975add01e 100644
--- a/desktop/screenfetch/screenfetch.SlackBuild
+++ b/desktop/screenfetch/screenfetch.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for Screenfetch.
#
@@ -47,14 +47,24 @@
# 2.0 20-JUNE-2020 Updated to a new upstream ver. 3.9.1.
# Added Double quotes in variables.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM="screenfetch"
SRCNAM="screenFetch"
VERSION="${VERSION:-3.9.1}"
BUILD="${BUILD:-1}"
TAG="${TAG:-_SBo}"
+PKGTYPE=${PKGTYPE:-tgz}
ARCH="noarch"
DOCS="CHANGELOG COPYING README.mkdn TODO"
-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}"
@@ -84,4 +94,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"