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 fi
tar -xvf wit.tar.gz tar -xvf wit.tar.gz
cd wit-v*/ 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." echo "You will now be prompted to enter your password for sudo in order for wit to install."
sudo ./install.sh sudo ./install.sh
fi
cd .. cd ..
rm -rf wit-v*/ rm -rf wit-v*/
# check if wit is installed now # check if wit is installed now