Minor improvements

Improved error text on install.sh and uninstall.sh
This commit is contained in:
David Eleazar 2023-09-20 01:05:00 +07:00
parent e49e8f749e
commit 999e557ac8
No known key found for this signature in database
GPG Key ID: 2D07ED54845E0541
2 changed files with 10 additions and 4 deletions

View File

@ -29,12 +29,16 @@ if [ ! $(which git) ]; then
fi
if (( $EUID != 0 )); then
echo "Please run as root"
echo "Usage: sudo bash install.sh [your_authtoken]"
echo "_____"
echo "ERROR: Please run as root."
exit 1
fi
if [ -z "$1" ]; then
echo "./install.sh <your_authtoken>"
if [ -z "$1" ];
echo "Usage: sudo bash install.sh [your_authtoken]"
echo "_____"
echo "ERROR: You must supply an authentication token as an argument."
exit 1
fi

View File

@ -1,7 +1,9 @@
#!/usr/bin/env bash
if (( $EUID != 0 )); then
echo "Please run as root"
echo "Usage: sudo bash uninstall.sh"
echo "_____"
echo "ERROR: Please run as root."
exit 1
fi