os 461 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. if [ "X$OS" != "X" ] && echo "$OS" | grep -q '`'
  3. then
  4. OS=
  5. fi
  6. if [ "X$OS" = "X" ]
  7. then OS=bloat-os
  8. MACHINE=`uname -m | sed -e 's/ //g' | sed -e 's?/?-?g'`
  9. SYSTEM=`uname -s | sed -e 's/ //g' | sed -e 's?/?-?g'`
  10. OS="${MACHINE}-${SYSTEM}"
  11. if [ -f ../scripts/gnu-os ]
  12. then OS=`../scripts/gnu-os | sed s/unknown-//`
  13. fi
  14. if [ -f ../../scripts/gnu-os ]
  15. then OS=`../../scripts/gnu-os | sed s/unknown-//`
  16. fi
  17. fi
  18. echo $OS