add guard to all scripts
This commit is contained in:
parent
4d6863c16b
commit
54f8063d2c
7
apps.sh
7
apps.sh
@ -1,6 +1,11 @@
|
||||
#!/bin/bash
|
||||
main(){
|
||||
run_apps_install;
|
||||
if [[ "$(whoami)" != "root" ]];then
|
||||
bash ./error.sh "Must be root (current: $USER)";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
run_apps_install;
|
||||
}
|
||||
|
||||
_install_app(){
|
||||
|
6
cli.sh
6
cli.sh
@ -1,7 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
main(){
|
||||
run_cli_install;
|
||||
if [[ "$(whoami)" != "root" ]];then
|
||||
bash ./error.sh "Must be root (current: $USER)";
|
||||
exit 1;
|
||||
fi
|
||||
run_cli_install;
|
||||
}
|
||||
|
||||
_install_cli(){
|
||||
|
6
dots.sh
6
dots.sh
@ -1,7 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
main(){
|
||||
run_dotfiles_install;
|
||||
if [[ "$(whoami)" != "root" ]];then
|
||||
bash ./error.sh "Must be root (current: $USER)";
|
||||
exit 1;
|
||||
fi
|
||||
run_dotfiles_install;
|
||||
}
|
||||
|
||||
_install_dotfiles(){
|
||||
|
@ -3,6 +3,8 @@
|
||||
# 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)
|
||||
# power management (install this first) https://github.com/FlyGoat/RyzenAdj
|
||||
# power management (install this second) https://github.com/aarron-lee/SimpleDeckyTDP
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
main(){
|
||||
run_non_pac_install;
|
||||
if [[ "$(whoami)" != "root" ]];then
|
||||
bash ./error.sh "Must be root (current: $USER)";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
run_non_pac_install;
|
||||
}
|
||||
|
||||
_install_non_pacman(){
|
||||
|
@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$(whoami)" != "root" ]];then
|
||||
bash ./error.sh "Must be root (current: $USER)";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
xdg-settings set default-web-browser io.github.zen_browser.zen.desktop
|
||||
|
||||
if [[ $(which $SHELL) != "/bin/fish" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user