skip sudo if root

This commit is contained in:
Bryson Steck 2022-06-04 17:10:41 -06:00
parent 93b54e8412
commit 7d5d117760

View file

@ -78,8 +78,12 @@ if [[ ERROR -ne 0 ]]; then
fi
tar -xvf wit.tar.gz
cd wit-v*/
if [[ $(id -u) == 0 ]]; then
./install.sh
else
echo "You will now be prompted to enter your password for sudo in order for wit to install."
sudo ./install.sh
fi
cd ..
rm -rf wit-v*/
# check if wit is installed now