From 84c29bbdcbe43a5f400413baf64ccda4176c54a1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 21 May 2022 23:37:14 +0100 Subject: [PATCH] Make sure focal packages have priority Signed-off-by: falkTX --- repo/generate-repo-page.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repo/generate-repo-page.sh b/repo/generate-repo-page.sh index d859422..c23dddf 100755 --- a/repo/generate-repo-page.sh +++ b/repo/generate-repo-page.sh @@ -113,7 +113,7 @@ for PACKAGE in ${PACKAGES[@]}; do continue fi - PACKAGE_LINESTART=$(cat Packages | grep -x -n "Package: ${PACKAGE}" | cut -d ':' -f 1 | sort | tail -n 1) + PACKAGE_LINESTART=$(cat Packages | grep -x -n "Package: ${PACKAGE}" | cut -d ':' -f 1 | sort -n | tail -n 1) PACKAGE_NUMLINES=$(cat Packages | tail -n +$((${PACKAGE_LINESTART} + 1)) | grep -n "Package: " | head -n 1 | cut -d ':' -f 1) if [ -n "${PACKAGE_NUMLINES}" ]; then PACKAGE_DETAILS=$(cat Packages | tail -n +${PACKAGE_LINESTART} | head -n ${PACKAGE_NUMLINES}) @@ -190,7 +190,7 @@ for PACKAGE in ${PACKAGES[@]}; do echo "$((${PACKAGE_SIZE} / 1024))Kb" fi if [ -n "${PACKAGE_DATA}" ]; then - PACKAGE_DATA_LINESTART=$(cat Packages | grep -x -n "Package: ${PACKAGE_DATA}" | cut -d ':' -f 1 | sort | tail -n 1) + PACKAGE_DATA_LINESTART=$(cat Packages | grep -x -n "Package: ${PACKAGE_DATA}" | cut -d ':' -f 1 | sort -n | tail -n 1) PACKAGE_DATA_NUMLINES=$(cat Packages | tail -n +$((${PACKAGE_DATA_LINESTART} + 1)) | grep -n "Package: " | head -n 1 | cut -d ':' -f 1) if [ -n "${PACKAGE_DATA_NUMLINES}" ]; then PACKAGE_DATA_DETAILS=$(cat Packages | tail -n +${PACKAGE_DATA_LINESTART} | head -n ${PACKAGE_DATA_NUMLINES}) @@ -284,4 +284,4 @@ for PACKAGE in ${PACKAGES[@]}; do echo done -rm -f Packages.gz Packages +rm -f Packages Packages.bionic Packages.focal