50 lines
1.0 KiB
Bash
Executable File
50 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Default terminal icon value (empty if not provided)
|
|
terminal_icon=""
|
|
|
|
# Function to display script usage
|
|
usage() {
|
|
echo "Usage: $0 [--terminal-icon <nerd font symbol>]"
|
|
exit 1
|
|
}
|
|
|
|
# Parse command-line options
|
|
while [[ $# -gt 0 ]]; do
|
|
key="$1"
|
|
|
|
case $key in
|
|
--terminal-icon)
|
|
terminal_icon="$2"
|
|
shift # past argument
|
|
shift # past value
|
|
;;
|
|
*)
|
|
# unknown option
|
|
usage
|
|
;;
|
|
esac
|
|
done
|
|
|
|
configure_terminal() {
|
|
echo "Configuring terminal..."
|
|
sudo chmod +x ./terminal/setup.sh
|
|
./terminal/setup.sh --icon "$terminal_icon"
|
|
}
|
|
|
|
configure_apt_cacher() {
|
|
echo "Configuring apt-cacher..."
|
|
sudo chmod +x ./apt-cacher/setup.sh
|
|
./apt-cacher/setup.sh
|
|
}
|
|
|
|
configure_terminal
|
|
configure_apt_cacher
|
|
|
|
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 |