A healthy dose of sillyness
[retty.git] / getarch.sh
blob9429ceb130015325a982422e42626167746ce949
1 #!/bin/sh
3 # 'Ah yes, I recognized the name. I recollect the time when young Frodo Baggins
4 # was one of the worst young rascals of Buckland. But it wasn't mushrooms I was
5 # thinking of. I had just heard the name Baggins before you turned up. What do
6 # you think that funny customer asked me?'
8 check_support() {
9 if [ ! -f arch/attach-$1.[cS] ]; then
10 ARCH="none"
11 OS="none"
15 ARCH=`uname -m`
16 if echo $ARCH | grep '^i.86$' >/dev/null 2>/dev/null; then
17 ARCH=ia32
20 OS=`uname|tr [A-Z] [a-z]`
22 check_support $ARCH-$OS
24 if [ "x$1" = "x-os" ]; then
25 echo $OS
26 elif [ "x$1" = "x-arch" ]; then
27 echo $ARCH