annotate find-alt-triple.sh @ 1651:cb960b882ca3 tip

bindings were moved to dsource.org/projects/bindings/
author Moritz Warning <moritzwarning@web.de>
date Thu, 20 May 2010 20:05:03 +0200
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