File: os

package info (click to toggle)
lmbench 3.0-a9%2Bdebian.1-6
  • links: PTS
  • area: non-free
  • in suites: bookworm
  • size: 2,996 kB
  • sloc: ansic: 12,328; perl: 6,531; sh: 2,784; makefile: 731
file content (20 lines) | stat: -rwxr-xr-x 470 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

if [ "X$OS" != "X" ] && echo "$OS" | grep '`' > /dev/null
then
    OS=
fi

if [ "X$OS" = "X" ]
then	OS=bloat-os
    MACHINE=`uname -m | sed -e 's/ //g' | sed -e 's?/?-?g'`
    SYSTEM=`uname -s | sed -e 's/ //g' | sed -e 's?/?-?g'`
    OS="${MACHINE}-${SYSTEM}"
    if [ -f ../scripts/gnu-os ]
    then	OS=`../scripts/gnu-os | sed s/unknown-//`
    fi
    if [ -f ../../scripts/gnu-os ]
    then	OS=`../../scripts/gnu-os | sed s/unknown-//`
    fi
fi
echo $OS