home · contact · privacy
Enhance bookworm setup.
[config] / bookworm / setup_scripts / setup_desktop.sh
index c306dbeedc34a66405d1f9d1c89257b801f36bde..9675df81987ac29ebfc3198ea6aa122f603121f6 100755 (executable)
@@ -1,32 +1,16 @@
 #!/bin/sh
 set -e
 set -x
-debian_version="bookworm"
-legal_system_names="x220 w530"
+. ./misc.sh
 
-if [ "$#" -ne 1 ]; then
-    echo 'Need exactly one argument (system name).'
-    false
-fi
-found=0
-for system_name_i in $legal_system_names; do
-    if [ "$1" = "$system_name_i" ]; then
-        found=1
-        system_name="${system_name_i}"
-        continue       
-    fi
-done
-if [ "$found" = 0 ]; then
-    echo "Need legal system name."
-    false
-fi
+expect_n_args 1 "(system name)" "$@"
+get_system_name_arg "$1"
 
 # Set up system without user environment.
-config_tree_prefix="${HOME}/config/${debian_version}"
-setup_scripts_dir="${config_tree_prefix}/setup_scripts"
 cd "${setup_scripts_dir}"
 ./setup.sh "${system_name}" "" user desktop thinkpad "${system_name}"
 
+# Set up NVIDIA eGPU config.
 if [ "$system_name" = "w530" ]; then
     cd
     git clone https://github.com/NVIDIA/open-gpu-kernel-modules