mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-08 16:30:28 +03:00
gradlew-fdroid: fix random failures due to empty $line, closes #815
This commit is contained in:
parent
6258a939e6
commit
f8a1b45df5
2 changed files with 18 additions and 7 deletions
|
|
@ -168,7 +168,7 @@ v_all=${plugin_v[@]}
|
|||
for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
|
||||
[[ -f $f ]] || continue
|
||||
while IFS='' read -r line || [ -n "$line" ]; do
|
||||
line=$(printf $line | tr -d '\r') # strip Windows linefeeds
|
||||
line=$(printf "$line" | tr -d '\r') # strip Windows linefeeds
|
||||
if [[ $line == 'distributionUrl='* ]]; then
|
||||
wrapper_ver=${line#*/gradle-}
|
||||
wrapper_ver=${wrapper_ver%-*.zip}
|
||||
|
|
@ -187,7 +187,7 @@ fi
|
|||
for f in {.,..}/build.gradle{,.kts}; do
|
||||
[[ -f $f ]] || continue
|
||||
while IFS='' read -r line || [ -n "$line" ]; do
|
||||
line=$(printf $line | tr -d '\r') # strip Windows linefeeds
|
||||
line=$(printf "$line" | tr -d '\r') # strip Windows linefeeds
|
||||
if [[ -z "$plugin_pver" && $line == *'com.android.tools.build:gradle:'* ]]; then
|
||||
plugin_pver=${line#*[\'\"]com.android.tools.build:gradle:}
|
||||
plugin_pver=${plugin_pver%[\'\"]*}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue