2024-06-27 21:28:17 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-07-01 20:58:28 +02:00
|
|
|
# Default terminal icon value (empty if not provided)
|
|
|
|
terminal_icon=""
|
2024-06-27 22:22:33 +02:00
|
|
|
|
|
|
|
# Function to display script usage
|
|
|
|
usage() {
|
2024-07-01 20:58:28 +02:00
|
|
|
echo "Usage: $0 [--terminal-icon <nerd font symbol>]"
|
2024-06-27 22:22:33 +02:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
# Parse command-line options
|
2024-06-27 22:27:05 +02:00
|
|
|
while [[ $# -gt 0 ]]; do
|
|
|
|
key="$1"
|
|
|
|
|
|
|
|
case $key in
|
2024-07-01 20:58:28 +02:00
|
|
|
--terminal-icon)
|
|
|
|
terminal_icon="$2"
|
2024-06-27 22:27:05 +02:00
|
|
|
shift # past argument
|
|
|
|
shift # past value
|
2024-06-27 22:22:33 +02:00
|
|
|
;;
|
2024-06-27 22:27:05 +02:00
|
|
|
*)
|
|
|
|
# unknown option
|
2024-06-27 22:22:33 +02:00
|
|
|
usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2024-07-01 20:58:28 +02:00
|
|
|
configure_terminal() {
|
|
|
|
echo "Configuring terminal..."
|
|
|
|
sudo chmod +x ./terminal/setup.sh
|
|
|
|
./terminal/setup.sh --icon "$terminal_icon"
|
2024-06-27 21:28:17 +02:00
|
|
|
}
|
|
|
|
|
2024-07-01 20:58:28 +02:00
|
|
|
configure_apt_cacher() {
|
|
|
|
echo "Configuring apt-cacher..."
|
|
|
|
sudo chmod +x ./apt-cacher/setup.sh
|
|
|
|
./apt-cacher/setup.sh
|
2024-07-06 19:25:54 +02:00
|
|
|
}
|
|
|
|
|
2024-07-01 20:58:28 +02:00
|
|
|
configure_terminal
|
|
|
|
configure_apt_cacher
|
2024-07-06 19:25:54 +02:00
|
|
|
install_node_if_no_gui
|
2024-07-07 13:58:32 +02:00
|
|
|
|
|
|
|
if [ -z "$XDG_CURRENT_DESKTOP" ]; then
|
|
|
|
echo "No GUI detected, not installing graphical apps..."
|
|
|
|
else
|
|
|
|
echo "GUI detected, let's install some graphical apps!"
|
|
|
|
sudo chmod +x ./gui/setup.sh
|
|
|
|
./gui/setup.sh
|
|
|
|
fi
|