mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
gradlew-fdroid: use last duplicate key like java.util.Properties
This commit is contained in:
parent
a9b2f624e5
commit
f160ae55cb
@ -213,7 +213,8 @@ plugin_v=(8.1.1 8.1 8.0.2 8.0.1 8.0 7.6.1 7.6 7.5.1 7.5 7.4.2 7.4.1 7.4 7.3.3 7.
|
|||||||
|
|
||||||
v_all=${plugin_v[@]}
|
v_all=${plugin_v[@]}
|
||||||
|
|
||||||
# Earliest takes priority
|
# Earliest file takes priority
|
||||||
|
# Last key takes priority if there are duplicates (matching java.util.Properties)
|
||||||
for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
|
for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
|
||||||
[[ -f $f ]] || continue
|
[[ -f $f ]] || continue
|
||||||
while IFS='' read -r line || [ -n "$line" ]; do
|
while IFS='' read -r line || [ -n "$line" ]; do
|
||||||
@ -221,9 +222,9 @@ for f in {.,..}/gradle/wrapper/gradle-wrapper.properties; do
|
|||||||
if [[ $line == 'distributionUrl='* ]]; then
|
if [[ $line == 'distributionUrl='* ]]; then
|
||||||
wrapper_ver=${line#*/gradle-}
|
wrapper_ver=${line#*/gradle-}
|
||||||
wrapper_ver=${wrapper_ver%-*.zip}
|
wrapper_ver=${wrapper_ver%-*.zip}
|
||||||
break 2
|
|
||||||
fi
|
fi
|
||||||
done < $f
|
done < $f
|
||||||
|
[[ -n $wrapper_ver ]] && break
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n $wrapper_ver ]]; then
|
if [[ -n $wrapper_ver ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user