summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-08 14:52:22 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-08 14:52:22 -0600
commitf606fb38d6543b2069b7929713933b97c498c7ce (patch)
tree9b07f17261ad90063424a9e64a2f2a931b0d3122
parentf68969029bbc59637e3c9eac30d1ee2fefc4d8d9 (diff)
librestage: go back to looping over all arches
This for users who cross-compile for multiple architectures.
-rwxr-xr-xsrc/abslibre-tools/librestage60
-rw-r--r--src/libretools.conf4
2 files changed, 32 insertions, 32 deletions
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
diff --git a/src/libretools.conf b/src/libretools.conf
index ae2a85b..070d289 100644
--- a/src/libretools.conf
+++ b/src/libretools.conf
@@ -19,6 +19,10 @@ DIFFTOOL=`which kdiff3 meld gvimdiff vimdiff colordiff diff 2>/dev/null|sed 's/\
# precedence on the path cache (the last path added replaces the rest)
REPOS=('core' 'libre' 'extra' 'community' 'libre-testing' 'social' 'sugar' 'pcr' 'java')
+## The architectures you'll be packaging for
+## Used by `librestage`
+ARCHES=('x86_64' 'i686' 'mips64el')
+
################################################################################
# abslibre #
################################################################################