summaryrefslogtreecommitdiffstats
path: root/games/fortune_doctor_who/fortune_doctor_who.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/fortune_doctor_who/fortune_doctor_who.SlackBuild')
-rw-r--r--games/fortune_doctor_who/fortune_doctor_who.SlackBuild24
1 files changed, 16 insertions, 8 deletions
diff --git a/games/fortune_doctor_who/fortune_doctor_who.SlackBuild b/games/fortune_doctor_who/fortune_doctor_who.SlackBuild
index 0028f8226f..2ca1571e48 100644
--- a/games/fortune_doctor_who/fortune_doctor_who.SlackBuild
+++ b/games/fortune_doctor_who/fortune_doctor_who.SlackBuild
@@ -1,23 +1,31 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for fortune_doctor_who
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230107 bkw: fix PRINT_PACKAGE_NAME.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=fortune_doctor_who
-VERSION=${VERSION:-20150503}
+VERSION=${VERSION:-20200923}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+ARCH=noarch
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-ARCH=noarch
-
set -e
rm -rf $PKG
@@ -34,7 +42,7 @@ mkdir -p $PKG/usr/share/games/fortunes
# The "fmt -s" splits long lines (which is at least a start at de-uglifying
# the formatting). Someone really needs to manually clean it up, maybe I will
# someday.
-for i in 01-08 09 10 11 12; do
+for i in 01-08 09 10 11 12 13; do
unzip $CWD/Doctor_Who$i-quotes.zip
sed 's/\r//' Doctor_Who$i.txt | fmt -s >> $PKG/usr/share/games/fortunes/doctor_who
done
@@ -52,4 +60,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