Last active
December 26, 2015 23:19
-
-
Save semistrict/7229387 to your computer and use it in GitHub Desktop.
gradlew search script
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/bash | |
_dir=$(pwd -P) | |
_lastdir= | |
until [ "$_dir" -ef "$_lastdir" ]; do | |
_cmd="$_dir/gradlew" | |
if test -e "$_cmd"; then | |
exec "$_cmd" "$@" | |
return $? | |
fi | |
_lastdir=$_dir | |
_dir="$(cd "$_dir/.." && pwd -P)" | |
done | |
echo "No `gradlew` script found. Run `gradle init` in the root directory of your project to initialize a new Gradle project." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment