diff --git a/repo/generate-repo-page.sh b/repo/generate-repo-page.sh index 6d1eab2..ff14b83 100755 --- a/repo/generate-repo-page.sh +++ b/repo/generate-repo-page.sh @@ -120,6 +120,8 @@ for PACKAGE in ${PACKAGES[@]}; do continue fi + PACKAGE_BASENAME=$(basename "${PACKAGE_FILENAME}") + PACKAGE_DATA=$(has_data_package "${PACKAGE}" && echo "${PACKAGE}-data" || echo) if [ -z "${PACKAGE_DATA}" ] && echo "${PACKAGE}" | grep -q -- \-; then PACKAGE_MAIN=$(echo "${PACKAGE}" | cut -d '-' -f 1) @@ -137,7 +139,7 @@ for PACKAGE in ${PACKAGES[@]}; do PACKAGE_HOMEPAGE=$(get_homepage "${PACKAGE_SOURCE}" "${PACKAGE_RVERSION}") PACKAGE_VCS_PAGE=$(get_vcs_page "${PACKAGE_SOURCE}" "${PACKAGE_RVERSION}") - if echo "${PACKAGE_FILENAME}" | grep -q "carla-bridge-win64_"; then + if echo "${PACKAGE_BASENAME}" | grep -q "carla-bridge-win64_"; then PACKAGE="carla-bridge-win" PACKAGE_DESCRIPTION="carla windows bridge" fi @@ -225,45 +227,45 @@ for PACKAGE in ${PACKAGES[@]}; do fi echo "Downloads:" - if echo "${PACKAGE_FILENAME}" | grep -q "carla-bridge-win64_"; then + if echo "${PACKAGE_BASENAME}" | grep -q "carla-bridge-win64_"; then # amd64 - echo "amd64  " + echo "amd64  " # i386 - PACKAGE_FILENAME_ARCHED=$(echo "${PACKAGE_FILENAME}" | sed "s/-win64_/-win32_/g" | sed "s/_amd64.deb/_i386.deb/g") - echo "i386  (install both)" + PACKAGE_BASENAME_ARCHED=$(echo "${PACKAGE_BASENAME}" | sed "s/-win64_/-win32_/g" | sed "s/_amd64.deb/_i386.deb/g") + echo "i386  (install both)" - elif echo "${PACKAGE_FILENAME}" | grep -q "carla-vst-wine_"; then + elif echo "${PACKAGE_BASENAME}" | grep -q "carla-vst-wine_"; then # amd64 - echo "amd64  " + echo "amd64  " # i386 - PACKAGE_FILENAME_ARCHED=$(echo "${PACKAGE_FILENAME}" | sed "s/_amd64.deb/_i386.deb/g") - echo "i386  " + PACKAGE_BASENAME_ARCHED=$(echo "${PACKAGE_BASENAME}" | sed "s/_amd64.deb/_i386.deb/g") + echo "i386  " - elif echo "${PACKAGE_FILENAME}" | grep -q "wineasio_"; then + elif echo "${PACKAGE_BASENAME}" | grep -q "wineasio_"; then # amd64 - PACKAGE_FILENAME_ARCHED=$(echo "${PACKAGE_FILENAME}" | sed "s/wineasio_/wineasio-amd64_/g") - echo "amd64  " + PACKAGE_BASENAME_ARCHED=$(echo "${PACKAGE_BASENAME}" | sed "s/wineasio_/wineasio-amd64_/g") + echo "amd64  " # i386 - PACKAGE_FILENAME_ARCHED=$(echo "${PACKAGE_FILENAME}" | sed "s/wineasio_/wineasio-i386_/g" | sed "s/_amd64.deb/_i386.deb/g") - echo "i386  " + PACKAGE_BASENAME_ARCHED=$(echo "${PACKAGE_BASENAME}" | sed "s/wineasio_/wineasio-i386_/g" | sed "s/_amd64.deb/_i386.deb/g") + echo "i386  " - elif echo "${PACKAGE_FILENAME}" | grep -q "_all.deb"; then - echo "all  " + elif echo "${PACKAGE_BASENAME}" | grep -q "_all.deb"; then + echo "all  " else for ARCH in ${PACKAGES_ARCHS[@]}; do - PACKAGE_FILENAME_ARCHED=$(echo "${PACKAGE_FILENAME}" | sed "s/_amd64.deb/_${ARCH}.deb/g") - echo "${ARCH}  " + PACKAGE_BASENAME_ARCHED=$(echo "${PACKAGE_BASENAME}" | sed "s/_amd64.deb/_${ARCH}.deb/g") + echo "${ARCH}  " done fi if [ -n "${PACKAGE_DATA}" ]; then if has_separate_data_package ${PACKAGE}; then - PACKAGE_FILENAME_DATA=$(echo "${PACKAGE_FILENAME}" | sed "s|/${PACKAGE}|/${PACKAGE_DATA}|g" | sed "s/_amd64.deb/_all.deb/g") + PACKAGE_BASENAME_DATA=$(echo "${PACKAGE_BASENAME}" | sed "s|/${PACKAGE}|/${PACKAGE_DATA}|g" | sed "s/_amd64.deb/_all.deb/g") else - PACKAGE_FILENAME_DATA=$(echo "${PACKAGE_FILENAME}" | sed "s|/${PACKAGE}_|/${PACKAGE_DATA}_|g" | sed "s/_amd64.deb/_all.deb/g") + PACKAGE_BASENAME_DATA=$(echo "${PACKAGE_BASENAME}" | sed "s|/${PACKAGE}_|/${PACKAGE_DATA}_|g" | sed "s/_amd64.deb/_all.deb/g") fi - echo "data" + echo "data" fi echo "" echo ""