diff --git a/apps.sh b/apps.sh index 943821a..0739dd1 100755 --- a/apps.sh +++ b/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(){ diff --git a/cli.sh b/cli.sh index 7ea5a47..25dac76 100755 --- a/cli.sh +++ b/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(){ diff --git a/dots.sh b/dots.sh index 885ebb2..4974b08 100755 --- a/dots.sh +++ b/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(){ diff --git a/install.sh b/install.sh index 79573b6..2f32619 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/non_pac.sh b/non_pac.sh index 1f29707..a9241f4 100755 --- a/non_pac.sh +++ b/non_pac.sh @@ -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(){ diff --git a/post_setup.sh b/post_setup.sh index e9996e4..3252804 100755 --- a/post_setup.sh +++ b/post_setup.sh @@ -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