diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-08-31 23:46:38 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:40 +0100 |
commit | 5a4b8ca4f9c00d3329d62edc390ce34cf2d9cd5a (patch) | |
tree | 5f780956633048a797224959cb6e8aea7c20d64a /functions | |
parent | 2cf18ef7f3244b3b2bf57cf96b9a39bc812870dd (diff) | |
download | live-build-5a4b8ca4f9c00d3329d62edc390ce34cf2d9cd5a.zip live-build-5a4b8ca4f9c00d3329d62edc390ce34cf2d9cd5a.tar.gz |
Improve architecture auto-detection.
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/defaults.sh | 14 |
1 files 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 |