d6aeb03b47
This reverts commit e8c8a9f76b
.
Change-Id: I9bb95f611460b0a1e657a79a1f4d02e0c1d4a291
111 lines
1.3 KiB
Bash
Executable File
111 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
S="Linux"
|
|
N="box"
|
|
R="4.14.10-tinycore64"
|
|
P="unknown"
|
|
V="#2017 SMP"
|
|
M="x86_64"
|
|
I="unknown"
|
|
O="GNU/Linux"
|
|
|
|
OPT_A=false
|
|
OPT_S=false
|
|
OPT_N=false
|
|
OPT_R=false
|
|
OPT_P=false
|
|
OPT_V=false
|
|
OPT_M=false
|
|
OPT_I=false
|
|
OPT_O=false
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "-ASNRPVMIO"
|
|
exit 1
|
|
fi
|
|
|
|
while :; do
|
|
case $1 in
|
|
-a)
|
|
OPT_A=true
|
|
shift
|
|
;;
|
|
-s)
|
|
OPT_S=true
|
|
shift
|
|
;;
|
|
-n)
|
|
OPT_N=true
|
|
shift
|
|
;;
|
|
-r)
|
|
OPT_R=true
|
|
shift
|
|
;;
|
|
-p)
|
|
OPT_P=true
|
|
shift
|
|
;;
|
|
-v)
|
|
OPT_V=true
|
|
shift
|
|
;;
|
|
-m)
|
|
OPT_M=true
|
|
shift
|
|
;;
|
|
-i)
|
|
OPT_I=true
|
|
shift
|
|
;;
|
|
-o)
|
|
OPT_O=true
|
|
shift
|
|
;;
|
|
-rs)
|
|
OPT_R=true
|
|
OPT_S=true
|
|
shift
|
|
;;
|
|
*)
|
|
if [ ! -z "$1" ]; then
|
|
echo "uname -asnrpvmio"
|
|
exit 1
|
|
fi
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if $OPT_A; then
|
|
echo "$S $N $R $V $M $O"
|
|
exit 0
|
|
fi
|
|
|
|
string=''
|
|
if $OPT_S; then
|
|
string="$string $S"
|
|
fi
|
|
if $OPT_N; then
|
|
string="$string $N"
|
|
fi
|
|
if $OPT_R; then
|
|
string="$string $R"
|
|
fi
|
|
if $OPT_P; then
|
|
string="$string $P"
|
|
fi
|
|
if $OPT_V; then
|
|
string="$string $V"
|
|
fi
|
|
if $OPT_M; then
|
|
string="$string $M"
|
|
fi
|
|
if $OPT_I; then
|
|
string="$string $I"
|
|
fi
|
|
if $OPT_O; then
|
|
string="$string $O"
|
|
fi
|
|
echo $string
|