@@ -17,19 +17,14 @@ source src/apps.sh
1717source src/desktop.sh
1818source src/laptop.sh
1919
20- # Variable notifying the user that the script is running.
21- if ! id " $USER " & > /dev/null; then
22- log_warn " You forget to change variables according to your needs. Go src/variables.sh and change according to your needs."
23- # Check if user forgot to change the VARIABLES.
24- if [ -n " $SUDO_USER " ]; then
25- whoami=" $SUDO_USER "
26- else
27- whoami=$( whoami)
28- fi
29-
30- log_warn " Script USER variable is: $USER but your username: $whoami ."
31- log_warn " Please change the USER variable and other variables according to your system configuration."
32-
20+ echo " =================================================="
21+ echo " important: this script uses configuration values from src/variables.sh"
22+ echo " please ensure you've reviewed and adjusted these values for your system."
23+ echo " =================================================="
24+ # TODO: better way to check and notify user to prevent variable errors.
25+ read -p " Have you reviewed src/variables.sh? (y/n): " user_confirmed
26+ if [[ " ${user_confirmed,,} " != " y" ]]; then
27+ log_warn " Please review src/variables.sh before running this script."
3328 exit 1
3429fi
3530
@@ -428,8 +423,6 @@ main() {
428423 if [[ " $system_type " == " laptop" ]]; then
429424 log_info " Executing laptop-specific functions..."
430425 laptop_hostname_change
431- # TEST: Currently on laptop but can be used on globally when desktop switch lightdm
432- nopasswdlogin_group
433426 tlp_setup
434427 thinkfan_setup
435428 touchpad_setup
@@ -450,6 +443,7 @@ main() {
450443 setup_files " $system_type "
451444 switch_ufw_setup
452445
446+ nopasswdlogin_group
453447 # services
454448 syncthing_setup
455449 trash_cli_setup
0 commit comments