summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-07-05 02:06:07 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-07-05 02:06:07 -0400
commit8435815a7690830dece329ac9a71b1da04f4ba38 (patch)
tree57888534cdcb22835c2d17bda5545ad18655f814 /src
parent715ddde04f599755d384c9f658ac52b3ee89a512 (diff)
librestage: clean up variable usage
Diffstat (limited to 'src')
-rwxr-xr-xsrc/abslibre-tools/librestage15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage
index 02bc0d0..c12688b 100755
--- a/src/abslibre-tools/librestage
+++ b/src/abslibre-tools/librestage
@@ -74,9 +74,12 @@ main() {
load_PKGBUILD
# Now for the main routine.
- staged=false
+ local staged=false
slock 8 "${WORKDIR}/staging.lock" \
'Waiting for a shared lock on the staging directory'
+
+ # Look for makepkg output
+ local CARCH _pkgname pkgfile
for CARCH in "${ARCHES[@]}" any; do
for _pkgname in "${pkgname[@]}" "${pkgname[@]/%/-debug}"; do
if ! pkgfile=$(find_cached_package "$_pkgname" "$(get_full_version "$_pkgname")" "$CARCH"); then
@@ -85,6 +88,11 @@ main() {
msg 'Found package: %s' "${pkgfile##*/}"
+ # This little check is from devtools:commitpkg
+ if grep -q "packager = Unknown Packager" <(bsdtar -xOqf "$pkgfile" .PKGINFO); then
+ die "PACKAGER wes not set when building package"
+ fi
+
xbs release "$repo" "$CARCH"
mkdir -p "${WORKDIR}/staging/${repo}"
if cp "$pkgfile" "${WORKDIR}/staging/${repo}/${pkgfile##*/}"; then
@@ -97,6 +105,9 @@ main() {
done
done
+ # Look for librefetch output
+ local netfile mirror path
+ local srcurl srcname srcpath
for netfile in "${source[@]}"; do
for mirror in "${MIRRORS[@]}"; do
srcurl=${netfile#*::}
@@ -116,7 +127,7 @@ main() {
done
if [[ -n "$srcpath" ]]; then
msg "Found generated source file: %s" "$srcname"
- dest="${WORKDIR}/staging/other/${srcurl##"$mirror"}"
+ local dest="${WORKDIR}/staging/other/${srcurl##"$mirror"}"
mkdir -p -- "${dest%/*}"
if cp "$srcpath" "$dest"; then
msg2 "%s staged on [%s]" "$srcname" other