summaryrefslogtreecommitdiffstats
path: root/games/4digits
diff options
context:
space:
mode:
Diffstat (limited to 'games/4digits')
-rw-r--r--games/4digits/4digits.SlackBuild16
-rw-r--r--games/4digits/README6
2 files changed, 17 insertions, 5 deletions
diff --git a/games/4digits/4digits.SlackBuild b/games/4digits/4digits.SlackBuild
index 81c6b88f32..38ee66076c 100644
--- a/games/4digits/4digits.SlackBuild
+++ b/games/4digits/4digits.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for 4digits
@@ -23,10 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=4digits
VERSION=${VERSION:-1.1.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,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}
@@ -114,4 +124,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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
diff --git a/games/4digits/README b/games/4digits/README
index ce87c6da70..d9dde8ee03 100644
--- a/games/4digits/README
+++ b/games/4digits/README
@@ -1,3 +1,5 @@
4digits is a guess-the-number puzzle game.
-It's also called Bulls and Cows, and in China people simply call it Guess-the-Number.
-The game's objective is to guess a four-digit number in 8 times.
+
+It's also called Bulls and Cows, and in China people simply call
+it Guess-the-Number. The game's objective is to guess a four-digit
+number in 8 tries.