fixup! Add tix-upgrade(8).

This commit is contained in:
Juhani Krekelä 2023-08-18 13:12:17 +00:00
parent 5e0fadf131
commit 60a9c312ff
1 changed files with 5 additions and 3 deletions

View File

@ -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