aboutsummaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-11-01 17:50:53 +0100
committer Eric Hameleers <alien@slackware.com>2019-11-01 17:50:53 +0100
commit8a39e6d26b920d7b4c5d2eca818d0c74ebcb0df5 (patch)
tree8417057319cb4f1ba745163cfbcfa9daacaaf26f /make_slackware_live.sh
parentd0b278a9b8417ef4e396a96bab52c0ef02bb8597 (diff)
downloadliveslak-8a39e6d26b920d7b4c5d2eca818d0c74ebcb0df5.tar.gz
liveslak-8a39e6d26b920d7b4c5d2eca818d0c74ebcb0df5.tar.xz
Fix a logic bug in finding packages
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-xmake_slackware_live.sh30
1 files changed, 17 insertions, 13 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index 72d09f0..f880514 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -320,18 +320,22 @@ uncompressfs () {
#
full_pkgname() {
PACK=$1
- TOPDIR=$2
- # Perhaps I will use this more readable code in future:
- #for FL in $(find ${TOPDIR} -name "${PACK}-*.t?z" 2>/dev/null) ; do
- # # Weed out package names starting with "$PACK"; we want exactly "$PACK":
- # if [ "$(echo $FL |rev |cut -d- -f4- |cut -d/ -f1 |rev)" != "$PACK" ]; then
- # continue
- # else
- # break
- # fi
- #done
- #echo "$FL"
- echo "$(find ${TOPDIR} -name "${PACK}-*.t?z" 2>/dev/null |grep -E "\<${PACK//+/\\+}-[^-]+-[^-]+-[^-]+.t?z" |head -1)"
+ if [ -e $2 ]; then
+ TOPDIR=$2
+ # Perhaps I will use this more readable code in future:
+ #for FL in $(find ${TOPDIR} -name "${PACK}-*.t?z" 2>/dev/null) ; do
+ # # Weed out package names starting with "$PACK"; we want exactly "$PACK":
+ # if [ "$(echo $FL |rev|cut -d- -f4-|cut -d/ -f1|rev)" != "$PACK" ]; then
+ # continue
+ # else
+ # break
+ # fi
+ #done
+ #echo "$FL"
+ echo "$(find ${TOPDIR}/ -name "${PACK}-*.t?z" 2>/dev/null |grep -E "\<${PACK//+/\\+}-[^-]+-[^-]+-[^-]+.t?z" |head -1)"
+ else
+ echo ""
+ fi
}
#
@@ -385,7 +389,7 @@ function install_pkgs() {
else
SELECTION=""
fi
- if [ ! -d ${SL_REPO} -o -z "$(find ${SL_PKGROOT} -type f 2>/dev/null)" ]; then
+ if [ ! -d ${SL_REPO} -o -z "$(find ${SL_PKGROOT}/ -type f 2>/dev/null)" ]; then
# Oops... empty local repository. Let's see if we can rsync from remote:
echo "** Slackware package repository root '${SL_REPO}' does not exist or is empty!"
RRES=1