Fix OS check

This commit is contained in:
poka 2020-05-19 21:28:09 +02:00
parent 843e30551c
commit e8cff93034
1 changed files with 4 additions and 3 deletions

View File

@ -12,9 +12,10 @@ export myProfile="$ASTRONODE/profile"
## Check system kind
[[ $(uname -a | grep arm) ]] && export ARM=yes || unset ARM
if [[ $(grep -E 'stretch|18.|19.' /etc/os-release) ]]; then export OS=stretch;
elif [[ $(grep buster /etc/os-release) ]]; then export OS=buster;
else echo "${c_red}OS not supported$c_"; exit 1; fi
if [[ $(grep -E '19.3|19.4' /etc/os-release) ]]; then export OS=buster;
elif [[ $(grep -E 'stretch|18.|19.' /etc/os-release) ]]; then export OS=stretch;
else export OS=buster;
fi
[[ -e $myProfile ]] && rm $myProfile
touch $myProfile