Skip to content

Commit

Permalink
notask: fixed tw script to support zsh and bash (tested on mac) (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgeadas authored Nov 24, 2023
1 parent dcb27e3 commit 2511a77
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tw
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash

current_shell=$(basename -- "$SHELL")

bash -c "./gradlew run -q --args=\"${*@Q}\""
#./gradlew run -q --args="$@"

if [ "$current_shell" = "bash" ]; then
echo "Running in Bash"
./gradlew run -q --args="${*@Q}"
elif [[ "$current_shell" = *"zsh"* ]]; then
echo "Running in Zsh"
./gradlew run -q --args="$@"
else
echo "Unknown shell: $current_shell"
exit 1
fi

0 comments on commit 2511a77

Please sign in to comment.