Checking wget and unzip command firstly

This commit is contained in:
peter279k 2020-04-29 23:35:05 +08:00
parent 6f3cf2642f
commit 6a60d66a7c

View File

@ -1,5 +1,15 @@
#!/usr/bin/env bash
if [ ! $(which wget) ]; then
echo 'Please install wget package'
exit 1
fi
if [ ! $(which unzip) ]; then
echo 'Please install zip package'
exit 1
fi
if (( $EUID != 0 )); then
echo "Please run as root"
exit 1