summaryrefslogtreecommitdiffstats
path: root/archbuild
diff options
context:
space:
mode:
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}