annotate find-alt-triple.sh @ 1638:0de4525a9ed6

Apply workaround for #395 by klickverbot.
author Christian Kamm <kamm incasoftware de>
date Mon, 08 Mar 2010 20:06:08 +0100
parents ca191c141cec
children
rev   line source
tomas@1023 1 #!/bin/bash
tomas@1022 2
tomas@1022 3 HOST_TARGET=$1
tomas@1022 4
tomas@1023 5 [ "$HOST_TARGET" = "" ] && exit 1
tomas@1022 6
tomas@1022 7 REST=`echo $HOST_TARGET | sed -e 's/[a-zA-Z0-9_]*\(\-.*\)/\1/'`
tomas@1022 8 X86=`echo $HOST_TARGET | sed -e 's/\(i[3-9]86\)\-.*/\1/'`
tomas@1022 9 X86_64=`echo $HOST_TARGET | sed -e 's/\(x86_64\)\-.*/\1/'`
tomas@1022 10
tomas@1022 11 ALT=
tomas@1022 12 if [ "$X86_64" != "$HOST_TARGET" ]; then
tomas@1022 13 ALT="i686$REST"
tomas@1022 14
tomas@1022 15 elif [ "$X86" != "$HOST_TARGET" ]; then
tomas@1022 16 ALT="x86_64$REST"
tomas@1022 17 fi
tomas@1022 18
tomas@1022 19 echo $ALT