summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-06 09:44:25 +0200
committerErich Eckner <git@eckner.net>2016-04-11 11:29:19 +0200
commitb41290c9dc76dbdb97fb590c5a7598f2d1f72c74 (patch)
tree93ff33772153dc69287083e65a4632634166fd79
parentd02c5e259e333fc8ef5b571134dede5e6070a481 (diff)
downloadarchlinuxewe-b41290c9dc76dbdb97fb590c5a7598f2d1f72c74.tar.xz
archPackagesUpdate kann jetzt wirklich mehrere Architekturen
-rwxr-xr-xarchPackagesUpdate62
1 files changed, 39 insertions, 23 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate
index e168a1a0b..ffc7c89a9 100755
--- a/archPackagesUpdate
+++ b/archPackagesUpdate
@@ -92,26 +92,33 @@ for paket in $( \
do
[ -d "${paket}" ] || continue
. ${paket}/PKGBUILD
- pkgFile="${paket}-${pkgver}-${pkgrel}-${arch[0]}.pkg.tar.xz"
- allExist=true
- [ "${arch[0]}" == "any" ] && \
- for dir in ${pkgDir}/*
- do
- [ "${dir}" == "any" ] && continue
- [ ! -d "${dir}" ] && continue
- [ ! -e "${dir}/${pkgFile}" ] && allExist=false
- done
-
- if ${force} || \
- ! ${aufRechenknecht} || \
- [ ! -e "${pkgDir}/${arch[0]}/${pkgFile}" ] || \
- ! ${allExist}
- then
- pakete[${#pakete[@]}]="${paket}"
- archs[${#archs[@]}]="${arch[0]}"
- verss[${#verss[@]}]="${pkgver}-${pkgrel}"
- fi
+ for singleArch in "${arch[@]}"
+ do
+
+ [ ! "${singleArch}" == "any" ] && [ ! "${singleArch}" == "$(uname -m)" ] && continue
+
+ pkgFile="${paket}-${pkgver}-${pkgrel}-${singleArch}.pkg.tar.xz"
+
+ allExist=true
+ [ "${singleArch}" == "any" ] && \
+ for dir in ${pkgDir}/*
+ do
+ [ "${dir}" == "any" ] && continue
+ [ ! -d "${dir}" ] && continue
+ [ ! -e "${dir}/${pkgFile}" ] && allExist=false
+ done
+
+ if ${force} || \
+ ! ${aufRechenknecht} || \
+ [ ! -e "${pkgDir}/${singleArch}/${pkgFile}" ] || \
+ ! ${allExist}
+ then
+ pakete[${#pakete[@]}]="${paket}"
+ archs[${#archs[@]}]="${singleArch}"
+ verss[${#verss[@]}]="${pkgver}-${pkgrel}"
+ fi
+ done
done
if ${aufRechenknecht}
@@ -126,7 +133,7 @@ then
vers="${verss[${i}]}"
cd "${tmpDir}/${paket}"
- rm -f ${paket}-*.pkg.tar.xz
+ rm -f ${paket}-*-${arch}.pkg.tar.xz
makepkg -fcsr --noconfirm || exit $?
# upload packages
@@ -162,14 +169,23 @@ then
read vers || break
read oarch || break
+# delete old versions of packages
+
for arch in *
do
[ ! -d "${arch}" ] && continue
[ ! "${arch}" == "any" ] && [ ! "${arch}" == "${oarch}" ] && continue
- ls ${arch}/${paket}-*-${oarch}.pkg.tar.xz | \
- grep -v "${arch}/${paket}-${vers}-${oarch}.pkg.tar.xz" | \
- xargs -rn1 rm
+ for zuLoeschen in $( \
+ ls ${arch}/${paket}-*-${oarch}.pkg.tar.xz | \
+ grep -v "${arch}/${paket}-${vers}-${oarch}.pkg.tar.xz" \
+ )
+ do
+ repo-remove \
+ "${arch}/archlinuxewe.db.tar.gz" \
+ "${zuLoeschen}"
+ rm "${zuLoeschen}"
+ done
done
done