This commit is contained in:
2018-10-02 21:44:47 -05:00
parent 5977993d55
commit 6d94791d43

30
test.sh
View File

@@ -25,23 +25,6 @@ echo -e "${CS[color,LightGreen]}Detected system: $distrib_name${CS[color,Default
echo ""
giveUp () {
echo "Unknown"
exit 0
}
# keep this easily awkable, prepending an initial clue
versionGuess () {
if [ -e /proc/version ]; then
echo -n "Unsure "
cat /proc/version
exit 0
fi
return 1
}
# if we have ignition, print and exit
gotDist () {
[ -n "$1" ] && echo "$1" && exit 0
@@ -71,20 +54,11 @@ linuxRelease () {
dist=$(uname -s 2> /dev/null)
if [ "$dist" = "Linux" ]; then
linuxRelease
versionGuess
giveUp
elif [ -n "$dist" ]; then
echo "$dist"
exit 0
else
versionGuess
giveUp
echo "Couldn't find system"
exit 1
fi
# we shouldn't get here
giveUp
# done
exit 0