Skip to content

Commit

Permalink
freebsd-pkg: get channel list before fetching packagesite.txz (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex6357 authored Oct 28, 2024
1 parent b9d9625 commit 9f21fd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions freebsd-pkg/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
source /curl-helper.sh

FBSD_PKG_UPSTREAM=${FBSD_PKG_UPSTREAM:-"http://pkg.freebsd.org"}
FBSD_PKG_EXCLUDE=${FBSD_PKG_EXCLUDE:-"^FreeBSD:[89]:"}
FBSD_PKG_EXCLUDE=${FBSD_PKG_EXCLUDE:-"^FreeBSD:([0-9]+:(?!amd64|i386|aarch64)[a-z0-9]+$)"}
FBSD_PKG_JOBS=${FBSD_PKG_JOBS:-1}
FBSD_PLATFORMS=$(mktemp)
export PARALLEL_SHELL=/bin/bash
Expand Down Expand Up @@ -85,7 +85,10 @@ if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
fi

while read platform; do
for channel in latest quarterly base_latest base_weekly base_release_0 base_release_1; do
echo "[INFO] getting channel list of $platform..."
channels=$($CURL_WRAP -sSL $FBSD_PKG_UPSTREAM/$platform | grep -oP 'latest|quarterly|base_[a-z0-9_]+' | sort -t : -rnk 2 | uniq)
echo $channels
for channel in $channels; do
if $CURL_WRAP -sLIf -o /dev/null $FBSD_PKG_UPSTREAM/$platform/$channel/packagesite.txz; then
channel_sync $FBSD_PKG_UPSTREAM/$platform/$channel $TO/$platform/$channel
fi
Expand Down

0 comments on commit 9f21fd2

Please sign in to comment.