aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-12-04 15:25:19 -0500
committerB. Watson <urchlay@slackware.uk>2023-12-05 03:24:19 -0500
commit5d6ae3b4e2b3369dbdb62110fbfde56ba2956f86 (patch)
tree5b7b3b11d18e63f3e9b742838260ce2fe5ffc4f3
parentef1ed343dd4ed8fcdc85d3a19793970c82d496fc (diff)
downloadsbo-maintainer-tools-5d6ae3b4e2b3369dbdb62110fbfde56ba2956f86.tar.gz
sbopkglint: don't explodepkg in current dir if $TMP dir missing.
-rwxr-xr-xsbopkglint8
1 files changed, 8 insertions, 0 deletions
diff --git a/sbopkglint b/sbopkglint
index 2e86174..efd483c 100755
--- a/sbopkglint
+++ b/sbopkglint
@@ -634,6 +634,9 @@ faillist=""
passcount=0
failcount=0
+# 20231204 bkw: Bad Things Happen if $TMP doesn't exist.
+mkdir -p "$TMP"
+
for package in $packages; do
if [ ! -e "$package" ]; then
warn "$package does not exist"
@@ -646,7 +649,12 @@ for package in $packages; do
ARCH="$( echo $filename | rev | cut -d- -f2 | rev )"
PRGNAM="$( echo $filename | rev | cut -d- -f4- | rev )"
VERSION="$( echo $filename | rev | cut -d- -f3 | rev )"
+
PKG="$( mktemp -d $TMP/sbopkglint.XXXXXX )"
+ if [ "$PKG" = "" ]; then
+ warn "Can't create temp directory in $TMP, bailing!"
+ exit 1
+ fi
totalwarns=0
foundtests=0