Created
August 15, 2016 02:55
-
-
Save zhcnxf/55a8581802d67838db2bdf2d442ac0bf to your computer and use it in GitHub Desktop.
Gradle wrapper finder
This file contains hidden or 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
#! /usr/bin/env bash | |
PWD=$(pwd) | |
while [[ ! -f $PWD/gradlew && ! $PWD == '/' ]]; do | |
PWD=$(dirname $PWD) | |
done | |
if [ -f $PWD/gradlew ]; then | |
echo Using $PWD/gradlew | |
bash $PWD/gradlew $@ | |
else | |
echo Cannot find a usable gradlew file | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment