tomas@1023: #!/bin/bash tomas@1022: tomas@1022: HOST_TARGET=$1 tomas@1022: tomas@1023: [ "$HOST_TARGET" = "" ] && exit 1 tomas@1022: tomas@1022: REST=`echo $HOST_TARGET | sed -e 's/[a-zA-Z0-9_]*\(\-.*\)/\1/'` tomas@1022: X86=`echo $HOST_TARGET | sed -e 's/\(i[3-9]86\)\-.*/\1/'` tomas@1022: X86_64=`echo $HOST_TARGET | sed -e 's/\(x86_64\)\-.*/\1/'` tomas@1022: tomas@1022: ALT= tomas@1022: if [ "$X86_64" != "$HOST_TARGET" ]; then tomas@1022: ALT="i686$REST" tomas@1022: tomas@1022: elif [ "$X86" != "$HOST_TARGET" ]; then tomas@1022: ALT="x86_64$REST" tomas@1022: fi tomas@1022: tomas@1022: echo $ALT