From b591e69541386f8fb3bbf6e49e2d6f2eefedb63e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 22 Aug 2010 21:52:23 +0200 Subject: add initial [multilib] support --- archbuild | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'archbuild') 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} -- cgit v1.2.3-24-g4f1b