diff options
author | Daniel Baumann <daniel@debian.org> | 2007-10-10 11:39:55 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:27 +0100 |
commit | 57444bb38b61d318c03f64947c8af49293da9342 (patch) | |
tree | d71abee033e472d3013bb5f35169fb403ff5efd9 /functions | |
parent | 095cc5f19a4366506a201f5972ed41a29e2f3abb (diff) | |
download | vyos-live-build-57444bb38b61d318c03f64947c8af49293da9342.tar.gz vyos-live-build-57444bb38b61d318c03f64947c8af49293da9342.zip |
Adding check to fail if a cross build is started (Closes: #444669, #444670).
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/architecture.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/functions/architecture.sh b/functions/architecture.sh index d9c84f869..6cc0cafa0 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" ] |