summaryrefslogtreecommitdiff
path: root/archbuild
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-22 21:52:23 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-22 21:52:23 +0200
commitb591e69541386f8fb3bbf6e49e2d6f2eefedb63e (patch)
treeeace574812fcefb8f4b1f24a46405c94029d5581 /archbuild
parent2f18ca1836cd2439953d4132867727b205cf929e (diff)
downloaddevtools32-b591e69541386f8fb3bbf6e49e2d6f2eefedb63e.tar.xz
add initial [multilib] support
Diffstat (limited to 'archbuild')
-rwxr-xr-xarchbuild14
1 files changed, 12 insertions, 2 deletions
diff --git a/archbuild b/archbuild
index ef62ca7..6967dce 100755
--- a/archbuild
+++ b/archbuild
@@ -1,8 +1,13 @@
#!/bin/bash
cmd="$(basename "${0%-build}")"
-repo=${cmd%-*}
-arch=${cmd#*-}
+if [ "${cmd}" == 'multilib' ]; then
+ repo='multilib'
+ arch='x86_64'
+else
+ repo=${cmd%-*}
+ arch=${cmd#*-}
+fi
chroots='/var/tmp/archbuild'
clean_first=false
@@ -26,6 +31,11 @@ if [ "$(uname -m)" == 'i686' -a "${arch}" != 'i686' ]; then
exit 1
fi
+if [ "$(uname -m)" != 'x86_64' -a "${repo}" == 'multilib' ]; then
+ echo 'You can only build multilib packages on a x86_64 system'
+ exit 1
+fi
+
if ${clean_first} || [ ! -d "${chroots}/${repo}-${arch}" ]; then
echo "Creating chroot for [${repo}] (${arch})..."
sudo rm -rf ${chroots}/${repo}-${arch}