From 5a4b8ca4f9c00d3329d62edc390ce34cf2d9cd5a Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Sun, 31 Aug 2008 23:46:38 +0100 Subject: Improve architecture auto-detection. --- functions/defaults.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index 791cf3c..ba3d944 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -237,8 +237,18 @@ Set_defaults () then LH_ARCHITECTURE="$(dpkg --print-architecture)" else - Echo_warning "Can't process file /usr/bin/dpkg, setting architecture to i386" - LH_ARCHITECTURE="i386" + case "$(uname -m)" in + sparc|powerpc) + LH_ARCHITECTURE="$(uname -m)" + ;; + x86_64) + LH_ARCHITECTURE="amd64" + ;; + *) + Echo_warning "Can't determine architecture, assuming i386" + LH_ARCHITECTURE="i386" + ;; + esac fi fi -- cgit v1.0