summaryrefslogtreecommitdiff
path: root/functions/architecture.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/architecture.sh')
-rwxr-xr-xfunctions/architecture.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/functions/architecture.sh b/functions/architecture.sh
index d9c84f8..6cc0caf 100755
--- a/functions/architecture.sh
+++ b/functions/architecture.sh
@@ -30,6 +30,28 @@ Check_architecture ()
fi
}
+Check_crossarchitecture ()
+{
+ if [ -x /usr/bin/dpkg ]
+ then
+ HOST="$(dpkg --print-architecture)"
+ else
+ HOST="$(uname -m)"
+ fi
+
+ case "${HOST}" in
+ amd64|i386)
+ CROSS="amd64 i386"
+ ;;
+
+ powerpc|ppc64)
+ CROSS="powerpc ppc64"
+ ;;
+ esac
+
+ Check_architecture "${CROSS}"
+}
+
Check_multiarchitecture ()
{
if [ "$(echo ${LH_ARCHITECTURE} | wc -w)" -gt "1" ]