diff options
author | B. Watson <urchlay@slackware.uk> | 2023-12-04 15:25:19 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-12-05 03:24:19 -0500 |
commit | 5d6ae3b4e2b3369dbdb62110fbfde56ba2956f86 (patch) | |
tree | 5b7b3b11d18e63f3e9b742838260ce2fe5ffc4f3 /sbopkglint | |
parent | ef1ed343dd4ed8fcdc85d3a19793970c82d496fc (diff) | |
download | sbo-maintainer-tools-5d6ae3b4e2b3369dbdb62110fbfde56ba2956f86.tar.gz |
sbopkglint: don't explodepkg in current dir if $TMP dir missing.
Diffstat (limited to 'sbopkglint')
-rwxr-xr-x | sbopkglint | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |