mirror of https://github.com/aristocratos/bashtop
Graceful exit on non-linux platforms.
parent
36e5c8e7f1
commit
4fd84d0510
16
bashtop
16
bashtop
|
@ -189,8 +189,24 @@ else
|
|||
}
|
||||
fi
|
||||
|
||||
system_check_() {
|
||||
local system
|
||||
case "$(uname -s)" in
|
||||
Linux*) system=Linux;;
|
||||
Darwin*) system=MacOS;;
|
||||
CYGWIN*) system=Cygwin;;
|
||||
MINGW*) system=MinGw;;
|
||||
*) system="Other"
|
||||
esac
|
||||
if [[ "$system" != "Linux" ]]; then
|
||||
echo "This tool does not support $system platform."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
init_() { #? Collect needed information and set options before startig main loop
|
||||
system_check_
|
||||
|
||||
local i
|
||||
#* Set terminal options, save and clear screen
|
||||
tput smcup
|
||||
|
|
Loading…
Reference in New Issue