summaryrefslogtreecommitdiff
path: root/librerepkg
diff options
context:
space:
mode:
Diffstat (limited to 'librerepkg')
-rwxr-xr-xlibrerepkg23
1 files changed, 14 insertions, 9 deletions
diff --git a/librerepkg b/librerepkg
index 706b603..c33a538 100755
--- a/librerepkg
+++ b/librerepkg
@@ -44,21 +44,26 @@ usage() {
while getopts 'h' arg; do
case $arg in
h) usage; exit 0 ;;
- *) makepkgflags=$@ ;;
esac
done
+makepkgflags=$@
+
tempdir=$(mktemp -d /tmp/$(basename $PWD).XXXXX)
-msg "Repackaging: $pkgname $pkgver-$pkgrel ($(date -u))"
-cp ./* ${tempdir}/
+for _arch in ${arch[@]}; do
+ export CARCH=${_arch}
+
+ msg "Repackaging: $pkgname $pkgver-$pkgrel ($(date -u))"
+ cp ./* ${tempdir}/
-stdnull pushd ${tempdir}
+ stdnull pushd ${tempdir}
-msg2 "Updating md5sums"
-makepkg -gp rePKGBUILD >> rePKGBUILD
+ msg2 "Updating md5sums"
+ makepkg -gp rePKGBUILD >> rePKGBUILD
-msg "Repackaging using makepkg"
-makepkg -Lcdp rePKGBUILD ${makepkgflags}
+ msg "Repackaging using makepkg"
+ makepkg -Lcdp rePKGBUILD ${makepkgflags}
-stdnull popd ${tempdir}
+ stdnull popd ${tempdir}
+done