An alternative solution is to create a custom 'cleanup' function for slackpkg to capture the contents of the $LIST variable created when 'slackpkg install-new' or 'slackpkg upgrade-all' are run.
So, in /usr/libexec/slackpkg/functions.d create a file xx_cleanup.sh containing:
Code:
No packages selected for download, exiting.
root@Eagle:~# cat /usr/libexec/slackpkg/functions.d/xx_cleanup.sh
#========================================================================
#
# PROGRAM FUNCTIONS
#
# Clean-up tmp and lock files
#
function cleanup() {
local retval=0
[ "$SPINNING" = "off" ] || tput cnorm
if [ -e $TMPDIR/error.log ]; then
retval=1
echo -e "
\n==============================================================================
WARNING! WARNING! WARNING! WARNING! WARNING!
==============================================================================
One or more errors occurred while slackpkg was running:
"
cat $TMPDIR/error.log
echo -e "
=============================================================================="
fi
echo
if [ "$DELALL" = "on" ] && [ "$NAMEPKG" != "" ]; then
rm $CACHEPATH/$NAMEPKG &>/dev/null
fi
rm -f /var/lock/slackpkg.$$
# The next line captures the list from install-new or upgrade-all suitable for use by download
echo "${LIST//.t[blxg]z}" > /tmp/mylist
rm -rf $TMPDIR
exit ${retval}
}
This file needs to be set executable with 'chmod +x /usr/libexec/slackpkg/functions.d/xx_cleanup.sh'.
With this in place you can run 'slackpkg upgrade-all' to see the list, then hit Cancel, so that slackpkg exits dropping the /tmp/mylist file.
To download the files,
Code:
slackpkg download $(tr '\n' ' ' < /tmp/mylist)