summaryrefslogtreecommitdiff
path: root/src/abslibre-tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/abslibre-tools')
-rwxr-xr-xsrc/abslibre-tools/librerelease16
-rwxr-xr-xsrc/abslibre-tools/librestage60
2 files changed, 38 insertions, 38 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index 5adb013..ed7f70c 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -76,10 +76,9 @@ create_signature() {
if (( ! ret )); then
msg2 "$(gettext "Created signature file %s.")" "$filename.sig"
else
- warning "$(gettext "Failed to sign package file.")"
+ error "$(gettext "Failed to sign package file.")"
+ return $ret
fi
-
- return $ret
}
function sign_packages {
@@ -163,10 +162,12 @@ function main {
}
function release_packages {
- [[ ! -z ${HOOKPRERELEASE} ]] && bash -c "${HOOKPRERELEASE}"
+ if [[ -n $HOOKPRERELEASE ]]; then
+ msg "Running HOOKPRERELEASE..."
+ bash -c "${HOOKPRERELEASE}"
+ fi
clean_non_packages
- # Sign packages or fail
sign_packages || return 1
# Make the permissions of the packages 644 otherwise the user will get access
@@ -200,7 +201,10 @@ function release_packages {
msg "Running db-update on repos"
ssh ${REPODEST%%:*} dbscripts/db-update
- [[ ! -z ${HOOKPOSTRELEASE} ]] && bash -c "${HOOKPOSTRELEASE}"
+ if [[ -n $HOOKPOSTRELEASE ]]; then
+ msg "Running HOOKPOSTRELEASE..."
+ bash -c "${HOOKPOSTRELEASE}"
+ fi
return 0
}
diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage
index e209beb..16dc772 100755
--- a/src/abslibre-tools/librestage
+++ b/src/abslibre-tools/librestage
@@ -58,48 +58,44 @@ main() {
}
# Load configuration
-
load_files libretools
- check_vars libretools WORKDIR || return 1
-
- load_files makepkg
+ check_vars libretools WORKDIR ARCHES || return 1
# Load the PKGBUILD
source ./PKGBUILD
- if [[ $arch == 'any' ]]; then
- CARCH='any'
- fi
# Now for the main routine.
staged=false
- for _pkgname in "${pkgname[@]}"; do
- pkgfile=${_pkgname}-$(get_full_version $_pkgname)-${CARCH}${PKGEXT}
- pkgpath="$(find . "$PKGDEST" -maxdepth 1 -type f -name "$pkgfile"|sed 1q)"
-
- if [[ ! -f "${pkgpath}" ]]; then
- continue
- else
- pkgpath="$(readlink -f "$pkgpath")"
- fi
+ for CARCH in "${ARCHES[@]}" any; do
+ for _pkgname in "${pkgname[@]}"; do
+ pkgfile=${_pkgname}-$(get_full_version $_pkgname)-${CARCH}${PKGEXT}
+ pkgpath="$(find . "$PKGDEST" -maxdepth 1 -type f -name "$pkgfile"|sed 1q)"
- msg "Found ${pkgfile}"
-
- canonical="" # is empty for the first iteration, set after that
- for repo in "${repos[@]}"; do
- mkdir -p "${WORKDIR}/staging/${repo}"
- if [[ -z $canonical ]]; then
- canonical="${WORKDIR}/staging/${repo}/${pkgfile}"
- cmd=(cp "$pkgpath" "$canonical")
- else
- cmd=(ln "$canonical" "${WORKDIR}/staging/${repo}/${pkgfile}")
- fi
- if "${cmd[@]}"; then
- msg2 "%s staged on [%s]" "$_pkgname" "$repo"
- staged=true
+ if [[ ! -f "${pkgpath}" ]]; then
+ continue
else
- error "Can't put %s on [%s]" "$_pkgname" "$repo"
- return 1
+ pkgpath="$(readlink -f "$pkgpath")"
fi
+
+ msg "Found ${pkgfile}"
+
+ canonical="" # is empty for the first iteration, set after that
+ for repo in "${repos[@]}"; do
+ mkdir -p "${WORKDIR}/staging/${repo}"
+ if [[ -z $canonical ]]; then
+ canonical="${WORKDIR}/staging/${repo}/${pkgfile}"
+ cmd=(cp "$pkgpath" "$canonical")
+ else
+ cmd=(ln "$canonical" "${WORKDIR}/staging/${repo}/${pkgfile}")
+ fi
+ if "${cmd[@]}"; then
+ msg2 "%s staged on [%s]" "$_pkgname" "$repo"
+ staged=true
+ else
+ error "Can't put %s on [%s]" "$_pkgname" "$repo"
+ return 1
+ fi
+ done
done
done