summaryrefslogtreecommitdiffstats
path: root/system/jsawk/jsawk.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/jsawk/jsawk.SlackBuild')
-rw-r--r--system/jsawk/jsawk.SlackBuild25
1 files changed, 17 insertions, 8 deletions
diff --git a/system/jsawk/jsawk.SlackBuild b/system/jsawk/jsawk.SlackBuild
index f08ddfd142..5a469e25e7 100644
--- a/system/jsawk/jsawk.SlackBuild
+++ b/system/jsawk/jsawk.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for jsawk
-# Copyright 2013,2016,2018 Andrew Clemons, Wellington, New Zealand
+# Copyright 2013,2016,2018-2020 Andrew Clemons, Wellington, New Zealand
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,14 +23,24 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=jsawk
VERSION=${VERSION:-1.4}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-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}
@@ -47,8 +57,8 @@ cp $CWD/jsawk $PKG/usr/bin
chmod 0755 $PKG/usr/bin/jsawk
chown root:root $PKG/usr/bin/jsawk
-if command -v js52 > /dev/null 2>&1 ; then
- sed -i '/JSBIN=/s/-js/-js52/' $PKG/usr/bin/jsawk
+if command -v js78 > /dev/null 2>&1 ; then
+ sed -i '/JSBIN=/s/-js/-js78/' $PKG/usr/bin/jsawk
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -58,5 +68,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