File: os

package info (click to toggle)
lmbench 3.0-a9%2Bdebian.1-3
  • links: PTS
  • area: non-free
  • in suites: bullseye
  • size: 2,752 kB
  • sloc: ansic: 12,328; perl: 6,531; sh: 3,965; makefile: 730
file content (21 lines) | stat: -rwxr-xr-x 513 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
21
#!/bin/sh
SCRIPTSDIR=${SCRIPTSDIR:-../scripts}

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 ${SCRIPTSDIR}/gnu-os ]
    then	OS=`${SCRIPTSDIR}/gnu-os | sed s/unknown-//`
    fi
    if [ -f ../../scripts/gnu-os ]
    then	OS=`../../scripts/gnu-os | sed s/unknown-//`
    fi
fi
echo $OS