refactor: Update starship.toml file path and add optional icon parameter in setup.sh
This commit is contained in:
parent
88c42a3dbd
commit
61c1899b5c
35
setup.sh
35
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 <nerd font symbol>]"
|
||||
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..."
|
||||
|
|
Loading…
Reference in New Issue