diff --git a/setup.sh b/setup.sh index 00266dae..abf7a7c4 100644 --- a/setup.sh +++ b/setup.sh @@ -3,6 +3,41 @@ # Exit immediately if a command exits with a non-zero status. set -e +# Default icon value (empty if not provided) +icon="" + +# Function to display script usage +usage() { + echo "Usage: $0 [--icon ]" + exit 1 +} + +# Parse command-line options +while getopts ":i:-:" opt; do + case $opt in + i) + icon="$OPTARG" + ;; + -) + case "${OPTARG}" in + icon=*) + icon="${OPTARG#*=}" + ;; + *) + usage + ;; + esac + ;; + :) + echo "Option -$OPTARG requires an argument." + usage + ;; + ?) + usage + ;; + esac +done + # Function to install Fish shell install_fish() { echo "Installing Fish shell..."