[arch-dev-public] how to call svn based devtools within a i686 (core) chroot
Thomas Bächler
thomas at archlinux.org
Tue Apr 8 18:34:50 EDT 2008
Andreas Radke schrieb:
> for x86_64 i can run archrelease from outside the chroot. but this
> won't work for i686.
What do you think of this?
diff --git a/extrapkg b/extrapkg
index d042300..4f94717 100755
--- a/extrapkg
+++ b/extrapkg
@@ -13,7 +13,17 @@ if [ -r ~/.makepkg.conf ]; then
source ~/.makepkg.conf
fi
-cmd=`basename $0`
+cmd=$(basename $0)
+case "${cmd}" in
+ *-*)
+ cmdarch="$(echo "${cmd}" | cut -d- -f2)"
+ cmd="$(echo "${cmd}" | cut -d- -f1)"
+ ;;
+ *)
+ cmdarch=""
+ cmd="${cmd}"
+ ;;
+esac
if [ ! -f PKGBUILD ]; then
echo "No PKGBUILD file"
@@ -21,7 +31,11 @@ if [ ! -f PKGBUILD ]; then
fi
# define staging areas based on architecture
-if [ "$CARCH" = "i686" ]; then
+if [ "${cmdarch}" = "i686" ]; then
+ suffix=''
+elif [ "${cmdarch}" = "x86_64" ]; then
+ suffix='64'
+elif [ "$CARCH" = "i686" ]; then
suffix=''
elif [ "$CARCH" = "x86_64" ]; then
suffix='64'
We could have symlinks like extrapkg-i686 or extrapkg-x86_64 then.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://archlinux.org/pipermail/arch-dev-public/attachments/20080409/23cd3925/attachment.pgp>
More information about the arch-dev-public
mailing list