diff options
author | Eric Hameleers <alien@slackware.com> | 2024-08-19 19:16:33 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2024-08-19 19:16:33 +0200 |
commit | 676239af11051a5837f4162635f9721db0d681fc (patch) | |
tree | 0af4a1d62a0e7097aacc503cc6c03c845313ae21 | |
parent | 761a31e418d264edc4f021fb4f59a4780fcef3d1 (diff) | |
download | liveslak-676239af11051a5837f4162635f9721db0d681fc.tar.gz liveslak-676239af11051a5837f4162635f9721db0d681fc.tar.xz |
When searching for a package, only return the most recent one
Example: when looking for 'kernel-generic' in patches, you will also find
the older kernels in directories called 'linux-old-*' which we do not
need or want to install.
Diffstat (limited to '')
-rwxr-xr-x | make_slackware_live.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 6e84ea5..2aa1dec 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -409,7 +409,8 @@ function full_pkgname() { # fi #done #echo "$FL" - echo "$(find ${TOPDIR}/ -name "${PACK}-*.t?z" 2>/dev/null |grep -E "\<${PACK//+/\\+}-[^-]+-[^-]+-[^-]+.t?z" |head -1)" + # Return the file with the most recent timestamp: + echo "$(find ${TOPDIR}/ -name "${PACK}-*.t?z" -exec ls -t {} + 2>/dev/null |grep -E "\<${PACK//+/\\+}-[^-]+-[^-]+-[^-]+.t?z" |head -1)" else echo "" fi |