Skip to content

Commit

Permalink
Fix param check
Browse files Browse the repository at this point in the history
  • Loading branch information
RustyTake-Off committed Jul 26, 2024
1 parent 815ee7c commit 79a544d
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions wslfiles/.dots/scripts/wslup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ write_colored_message() {

local message="$1"
local color="$2"
echo -e "${COLORS[$color]}${message}${COLORS[reset]}"
echo -e "${COLORS[$color]}$message${COLORS[reset]}"
}

get_help() {
Expand Down Expand Up @@ -157,17 +157,19 @@ set_dotfiles() {
}

# Main logic
case "$1" in
-h|--help)
get_help ;;
-a|--apt-apps)
get_apt_apps ;;
-b|--brew)
get_brew ;;
-ba|--brew-apps)
get_brew_apps ;;
-d|--dotfiles)
set_dotfiles ;;
*)
get_help ;;
esac
if [ $# -eq 0 ]; then
get_help
else
case "$1" in
-h|--help)
get_help ;;
-a|--apt-apps)
get_apt_apps ;;
-b|--brew)
get_brew ;;
-ba|--brew-apps)
get_brew_apps ;;
-d|--dotfiles)
set_dotfiles ;;
esac
fi

0 comments on commit 79a544d

Please sign in to comment.