linux-presets/setup.sh

54 lines
1.1 KiB
Bash
Raw Normal View History

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=""
# Function to display script usage
usage() {
2024-07-01 20:58:28 +02:00
echo "Usage: $0 [--terminal-icon <nerd font symbol>]"
exit 1
}
# Parse command-line options
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
2024-07-01 20:58:28 +02:00
--terminal-icon)
terminal_icon="$2"
shift # past argument
shift # past value
;;
*)
# unknown option
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
}
install_node_if_no_gui() {
if [ -z "$XDG_CURRENT_DESKTOP" ]; then
echo "No GUI detected, installing Node..."
sudo chmod +x ./teleport/install-node.sh
./teleport/install-node.sh
else
echo "GUI detected, skipping Node installation."
fi
}
2024-06-27 21:28:17 +02:00
2024-07-01 20:58:28 +02:00
configure_terminal
configure_apt_cacher
install_node_if_no_gui