1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-04 16:30:12 +02:00

Merge branch 'gradlew_no_eol' into 'master'

gradlew-fdroid: support parsing files with no EOL before EOF

See merge request fdroid/fdroidserver!707
This commit is contained in:
Hans-Christoph Steiner 2020-02-13 09:47:07 +00:00
commit e049a120f8

View File

@ -158,7 +158,7 @@ v_all=${plugin_v[@]}
# Earliest takes priority
for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
[[ -f $f ]] || continue
while read -r line; do
while IFS='' read -r line || [ -n "$line" ]; do
if [[ $line == 'distributionUrl='* ]]; then
wrapper_ver=${line#*/gradle-}
wrapper_ver=${wrapper_ver%-*.zip}
@ -176,7 +176,7 @@ fi
# Earliest takes priority
for f in {.,..}/build.gradle; do
[[ -f $f ]] || continue
while read -r line; do
while IFS='' read -r line || [ -n "$line" ]; do
if [[ -z "$plugin_pver" && $line == *'com.android.tools.build:gradle:'* ]]; then
plugin_pver=${line#*[\'\"]com.android.tools.build:gradle:}
plugin_pver=${plugin_pver%[\'\"]*}