Created
January 28, 2015 16:25
-
-
Save Ghedeon/acc85e647f83291668da to your computer and use it in GitHub Desktop.
The script searches for the Gradle Wrapper in the current directory and its parent directories and executes it. https://issues.gradle.org/browse/GRADLE-1378?focusedCommentId=17529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17529
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
D=$(pwd) | |
G="gradlew" | |
while [ ! -x "$D/$G" -a "$D" != "/" ]; do | |
D=$(dirname $D) | |
done | |
if [ ! -x "$D/$G" ]; then | |
echo "No Gradle found in current or parent directories!" | |
exit 1 | |
fi | |
echo "Run Gradle $D/$G ..." | |
"$D/$G" $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment