On 4/23/10 2:44 PM, Andreas Färber wrote:
Hello,
On Ubuntu Karmic `./config/scripts/switch-arch cross-ppc` did not recognize my powerpc-elf-gcc. The GNOME Terminal appears to use bash, where `type -p powerpc-elf-gcc && echo yah` works, but /bin/sh is dash, where it does not: echo "type -p powerpc-elf-gcc && echo yah" | /bin/sh
Ouch... I think we should change the script to use #!/bin/bash ...
If the next best distribution decides to go for tcsh, we're in trouble again, otherwise..
diff --git a/config/scripts/switch-arch b/config/scripts/switch-arch index c145e86..19dd877 100755 --- a/config/scripts/switch-arch +++ b/config/scripts/switch-arch @@ -88,7 +88,7 @@ select_prefix() { for TARGET in ${1}-linux-gnu- ${1}-elf- ${1}-eabi- do
if type -p ${TARGET}gcc > /dev/null
if which ${TARGET}gcc > /dev/null then return fi