add guard clause to enforce sudo user
This commit is contained in:
parent
d7c4c9e63b
commit
488b05e827
12
install.sh
12
install.sh
@ -1,9 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TODO should be applicable to other package managers (dnf, apt, ..)
|
||||
# v--- this is for potential future ideas
|
||||
# flatpak uninstall $(flatpak list --columns=application | grep -i turtle)
|
||||
|
||||
|
||||
|
||||
main(){
|
||||
if [[ "$(whoami)" != "root" ]];then
|
||||
bash ./error.sh "Must be root (current: $USER)";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
_update_pac
|
||||
bash ./dots.sh;
|
||||
bash ./cli.sh;
|
||||
@ -13,8 +21,8 @@ main(){
|
||||
}
|
||||
|
||||
_update_pac(){
|
||||
sudo pacman -Fy --noconfirm
|
||||
sudo pacman -Syu --noconfirm
|
||||
pacman -Fy --noconfirm
|
||||
pacman -Syu --noconfirm
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user