gradlew-fdroid: fix multiple gradle-wrapper.properties parsing

Stop looking for the Gradle version if we found it via distributionUrl
in ./gradle/wrapper/gradle-wrapper.properties. If we go on to parsing
../gradle/wrapper/gradle-wrapper.properties, we'll erroneously get the
version from there.
This commit is contained in:
relan 2019-01-27 11:24:47 +03:00
parent aa47e93f36
commit 8e471ad856
1 changed files with 1 additions and 0 deletions

View File

@ -145,6 +145,7 @@ for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
while read l; do
if [[ $l == 'distributionUrl='* ]]; then
wrapper_ver=$(echo -n "$l" | sed "s/.*gradle-\\([0-9\\.\\+]\\+\\).*/\\1/")
break 2
fi
done < $f
done