summaryrefslogtreecommitdiffstats
path: root/office/adobe-reader-fontpacks
diff options
context:
space:
mode:
author D Woodfall <dave@slackbuilds.org>2023-05-16 23:44:47 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-05-20 11:17:59 +0700
commit6f5a2dde9c1e84786e6063605ca472e5cc6c5b51 (patch)
tree18237f52e25ab0919387be74dd758ca24b07cca2 /office/adobe-reader-fontpacks
parent4a7a163157df0dfbf1b06bc02e114bfff9228be0 (diff)
downloadslackbuilds-6f5a2dde9c1e84786e6063605ca472e5cc6c5b51.tar.gz
slackbuilds-6f5a2dde9c1e84786e6063605ca472e5cc6c5b51.tar.xz
office/adobe-reader-fontpacks: Add SRCARCH to avoid lint errors.
Some code cleanup/changes, all commented in the script. Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/adobe-reader-fontpacks')
-rw-r--r--office/adobe-reader-fontpacks/adobe-reader-fontpacks.SlackBuild23
1 files changed, 17 insertions, 6 deletions
diff --git a/office/adobe-reader-fontpacks/adobe-reader-fontpacks.SlackBuild b/office/adobe-reader-fontpacks/adobe-reader-fontpacks.SlackBuild
index d6ff916578..93e50f27b2 100644
--- a/office/adobe-reader-fontpacks/adobe-reader-fontpacks.SlackBuild
+++ b/office/adobe-reader-fontpacks/adobe-reader-fontpacks.SlackBuild
@@ -26,7 +26,10 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=adobe-reader-fontpacks
VERSION=${VERSION:-9.1}
-ARCH=i486
+# SRCARCH/ARCH should avoid linter warnings
+# DW 2023-05-15
+SRCARCH=i486
+ARCH=i586
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -43,14 +46,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-set -e
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf ???KIT xtdfont
+# Use this as our tmp directory. Safer than rm'ing globbed dirs in $TMP
+# DW 2023-05-15
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
-LIST=$(ls $CWD/FontPack910_???_i486-linux.tar.bz2 2>/dev/null || (echo "ERROR: no FontPack tarball available, you need at least one of the files listed in the info file to build the package." > /dev/stderr ; exit 1))
+# builtin echo rather than ls
+# DW 2023-05-15
+LIST=$(echo $CWD/FontPack910_???_${SRCARCH}-linux.tar.bz2 2>/dev/null || (echo "ERROR: no FontPack tarball available, you need at least one of the files listed in the info file to build the package." > /dev/stderr ; exit 1))
mkdir $PKG/opt
@@ -68,10 +77,12 @@ do
cd -
done
-rm $PKG/opt/INSTALL
+rm -f $PKG/opt/INSTALL
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-mv $PKG/opt/LICREAD.TXT \
+# Not all packs have LICREAD.TXT
+# DW 2023-05-15
+[ -e $PKG/opt/LICREAD.TXT ] && cp -a $PKG/opt/LICREAD.TXT \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild