#!/bin/sh # get the "Deken CPU" for the given arch. # This is mainly targetted at Debian's ${DEB_HOST_ARCH} # it works for many cases of ${DEB_HOST_ARCH_CPU} resp # ${DEB_HOST_GNU_CPU}, but not for all # (notably the 'x32' Debian architecture has both # DEB_HOST_(ARCH|GNU)_CPU set to some x86_64 value) archmap_() { cat </dev/stderr < Prints the 'deken CPU' (as used in the filename for Pd-externals) for the given Debian (or GNU) architecture. Examples: $0 \$(dpkg-architecture -qDEB_HOST_ARCH) $0 \${DEB_HOST_ARCH} EOF } cpu="$1" if [ -z "${cpu}" ]; then usage exit 1 fi dekcpu=$(archmap | grep -E "^${cpu}\b" | awk '{print $2}') echo "${dekcpu:-$cpu}"