diff --git a/tix/tix-upgrade b/tix/tix-upgrade index e3d77d4c..e7ce2509 100755 --- a/tix/tix-upgrade +++ b/tix/tix-upgrade @@ -185,24 +185,26 @@ fi if $upgrade_ports; then # Fetch each port from the mirror. - ports=$(LC_ALL=C ls -- "$collection/tix/tixinfo") # TODO: Handle new mandatory / recommended ports. # TODO: Handle renamed ports. mkdir -p "$cachedir/repository" - for port in $ports; do + ports="" + for port in $(LC_ALL=C ls -- "$collection/tix/tixinfo"); do # The port has a hash if if it exists upstream. sha256=$(tix-fetch $fetch_options \ --collection="$collection" \ --input-release-file="$cachedir/release.sh" \ --input-sha256sum="$cachedir/sha256sum" \ --sha256 --port -- $port) - # If the port exists upstream, get the latest version. + # If the port exists upstream, get the latest version and note its name down + # for the extraction step. if [ -n "$sha256" ]; then tix-fetch $fetch_options \ --collection="$collection" \ --input-release-file="$cachedir/release.sh" \ --input-sha256sum="$cachedir/sha256sum" \ -c --port -O "$cachedir/repository" -- $port + ports="$ports $port" fi done fi