#!/bin/bash # Releases 'any' packages from Arch arches to ours trap_exit() { echo error "$@" exit 1 } source "$(dirname "$(readlink -e "$0")")/etc/dbscripts.cfg" source "$(dirname "$(readlink -e "$0")")/share/db-libremessages" # From makepkg set -E trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR # The architecture to compare with BASEARCH='x86_64' # Traverse all Arch repos for _repo in "${derivative_main_repositories[@]}"; do msg "Processing %s..." "${_repo}" # Find 'any' packages # This is hardcoded but it could release other arches... PKGS=($(find "${root_dir}/${_repo}/os/${BASEARCH}/" \ -iname '*-any.pkg.tar.?z' \ -printf "%f ")) if [ ${#PKGS[@]} -eq 0 ]; then msg2 "No '%s' packages here" any continue fi done