--- prt-utils-1.1.4/dllist 2020-10-15 05:16:54.000000000 -0400 +++ prt-utils-1.1.4d/dllist 2021-06-26 14:18:08.139831908 -0400 @@ -1,11 +1,12 @@ #!/bin/bash # -# Print a list of files to download; allows to either download the -# files required to install a package, all files (including those you -# already have installed) to install a package, or all files required -# to update your system +# Print a list of files to download, formatted in one of three ways: +# - the files required to install a specified package +# - the files required to install a package and all its dependencies +# (even dependencies that are already present on the system) +# - all files required to update your system # -# Johannes Winkelmann +# version 1.0 by Johannes Winkelmann, updated 2021-06 by John McQuah version=1.1 @@ -32,14 +33,26 @@ if [ "$DIFF" = "yes" ]; then list=(`prt-get quickdiff`) elif [ "$ALL" = "yes" ]; then - list=(`prt-get quickdep $@`) + list=(`prt-get quickdep ${args[*]}`) else - list=(`prt-get depends ${args[*]}|grep "\[ "|awk '{print $3}'`) + wlist=(${args[*]} `prt-get depends ${args[*]} | grep "\[ "|awk '{print $3}'`) + list=(`echo "${wlist[*]}" | sort | uniq`) fi -for p in ${list[*]}; do - . `prt-get path $p`/Pkgfile - for s in ${source[*]}; do - echo $s|grep tp: +SRCGLOB=$(grep PKGMK_SOURCE_DIR /etc/pkgmk.conf | sed 's/^\s*#// ; s/.*=//; s/\"//g') + +for l in ${list[*]}; do + PORTDIR=`prt-get path $l` + . $PORTDIR/Pkgfile + SAVELOC=`eval printf '%s' "$SRCGLOB"` + for (( p=0; p<${#source[@]}; p++ )) ; do + if [[ ${source[$p]} =~ ^(http|ftp|https): ]]; then + if [ -n "${renames[$p]}" -a "${renames[$p]}" != "SKIP" ]; then + FILE=${renames[$p]} + else + FILE=$(echo "${source[$p]}" | sed 's,.*/,,') + fi + [ -e ${SAVELOC:-$PORTDIR}/$FILE ] || echo ${source[$p]} + fi done done