#!/bin/bash set -e BASE_URL="https://repo.rakuos.org/dists" COMPONENTS=(main contrib non-free) ARCH=$(dpkg --print-architecture) APT_LIST_DIR="/var/lib/apt/lists" # Fetch list of suites from server SUITES=$(wget -qO- "$BASE_URL/" | grep -oP '(?<=href=")[^"/]+(?=/")') if [[ -z "$SUITES" ]]; then echo "Error: No suites found at $BASE_URL" exit 1 fi echo "Detected suites: $SUITES" echo for SUITE in $SUITES; do echo "=== Processing suite: $SUITE ===" for comp in "${COMPONENTS[@]}"; do COMP_URL="$BASE_URL/$SUITE/$comp/dep11" YAML_FILE="$COMP_URL/Components-$ARCH.yml.gz" ICON_FILE48="$COMP_URL/icons-48x48.tar.gz" ICON_FILE64="$COMP_URL/icons-64x64.tar.gz" ICON_FILE128="$COMP_URL/icons-128x128.tar.gz" # DEP-11 YAML if wget -q -O \ "$APT_LIST_DIR/repo.rakuos.org_dists_${SUITE}_${comp}_dep11_Components-${ARCH}.yml.gz" \ "$YAML_FILE"; then echo "Fetched DEP11 YAML for $SUITE / $comp" fi # 48px icons if wget -q -O \ "$APT_LIST_DIR/repo.rakuos.org_dists_${SUITE}_${comp}_dep11_icons-48x48.tar.gz" \ "$ICON_FILE48"; then echo "Fetched 48x48 icons for $SUITE / $comp" fi # 64px icons if wget -q -O \ "$APT_LIST_DIR/repo.rakuos.org_dists_${SUITE}_${comp}_dep11_icons-64x64.tar.gz" \ "$ICON_FILE64"; then echo "Fetched 64x64 icons for $SUITE / $comp" fi # 128px icons if wget -q -O \ "$APT_LIST_DIR/repo.rakuos.org_dists_${SUITE}_${comp}_dep11_icons-128x128.tar.gz" \ "$ICON_FILE128"; then echo "Fetched 128x128 icons for $SUITE / $comp" fi echo done done # Refresh AppStream cache if command -v appstreamcli >/dev/null; then echo "Refreshing AppStream..." appstreamcli refresh --source=os >/dev/null 2>&1 || true fi echo "All suites processed."