mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add requirement check to install script
This commit is contained in:
@@ -32,6 +32,14 @@ case $KERNEL in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
for req in curl wget; do
|
||||||
|
command_exists $req || {
|
||||||
|
output "missing required $req binary"
|
||||||
|
req_failed=1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
[ "$req_failed" == 1 ] && exit 1
|
||||||
|
|
||||||
sh_c='sh -c'
|
sh_c='sh -c'
|
||||||
if [ "$CURRENT_USER" != 'root' ]; then
|
if [ "$CURRENT_USER" != 'root' ]; then
|
||||||
if command_exists sudo; then
|
if command_exists sudo; then
|
||||||
|
|||||||
Reference in New Issue
Block a user