This commit is contained in:
2018-10-02 21:01:12 -05:00
parent bbf37aabf1
commit 9bf3ec989f
2 changed files with 33 additions and 3 deletions

23
test.sh
View File

@@ -1,10 +1,27 @@
#!/usr/bin/env bash
#curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/colors.inc | source
source /dev/stdin <<< "$(curl -sL http://scity.xyz/colorsinc)"
# Detect distribution name
if [[ `which lsb_release 2>/dev/null` ]]; then
# lsb_release available
distrib_name=`lsb_release -is`
else
# lsb_release not available
lsb_files=`find /etc -type f -maxdepth 1 \( ! -wholename /etc/os-release ! -wholename /etc/lsb-release -wholename /etc/\*release -o -wholename /etc/\*version \) 2> /dev/null`
for file in $lsb_files; do
if [[ $file =~ /etc/(.*)[-_] ]]; then
distrib_name=${BASH_REMATCH[1]}
break
else
echo -e "${BOrange}Sorry, GlancesAutoInstall script is not compliant with your system.${Color_Off}"
echo -e "${BOrange}Please read: https://github.com/nicolargo/glances#installation${Color_Off}"
exit 1
fi
done
fi
echo -e "$${CS[color,LightGreen]}Detected system: $distrib_name${CS[color,Default]}"
echo -e "${CS[color,LightBlue]}Testing TESTING ${CS[style,Bold]}REALLY TESTING${CS[style,Reset]}${CS[color,Default]}"
exit 0