diff --git a/.github/workflows/update-repo.yml b/.github/workflows/update-repo.yml index daab656..5a9b31f 100644 --- a/.github/workflows/update-repo.yml +++ b/.github/workflows/update-repo.yml @@ -24,15 +24,14 @@ jobs: cd x86_64 # Rebuild the DB tar -cvzf hyprarch-repo.db.tar.gz *.pkg.tar.zst - # Ensure a files archive exists cp hyprarch-repo.db.tar.gz hyprarch-repo.files.tar.gz - # Fix symlinks for GitHub Pages (actual files instead of symlinks) + # Fix symlinks for GitHub Pages rm -f hyprarch-repo.db hyprarch-repo.files cp hyprarch-repo.db.tar.gz hyprarch-repo.db cp hyprarch-repo.files.tar.gz hyprarch-repo.files - - name: Generate Python-style Index + - name: Generate Indices run: | # 1. Create the BASIC PYTHON-STYLE index for the x86_64 folder cd x86_64 @@ -43,13 +42,12 @@ jobs: if [ "$file" != "index.html" ]; then size=$(du -sh "$file" | cut -f1) date=$(date -r "$file" '+%d-%b-%Y %H:%M') - # Formatted alignment for the directory listing printf "%s%-$(($(printf '%s' "$file" | wc -c) > 50 ? 1 : 50 - $(printf '%s' "$file" | wc -c)))s %s %8s\n" "$file" "$file" "" "$date" "$size" >> index.html fi done echo "