mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:31:33 +01:00
[CI-SKIP] Fix "grep: repetition-operator operand invalid" (#1612)
Some flavours of grep don't like '?' in their expressions (also `.*?` means "match zero or more times or maybe do not match at all" as far as I know).
This commit is contained in:
parent
f4ecd3a322
commit
a6fb2b44fa
@ -25,8 +25,8 @@ versionjson="$workdir/Minecraft/$minecraftversion/$minecraftversion.json"
|
|||||||
if [ ! -f "$versionjson" ]; then
|
if [ ! -f "$versionjson" ]; then
|
||||||
echo "Downloading $minecraftversion JSON Data"
|
echo "Downloading $minecraftversion JSON Data"
|
||||||
verescaped=$(echo ${minecraftversion} | sed 's/\./\\./g')
|
verescaped=$(echo ${minecraftversion} | sed 's/\./\\./g')
|
||||||
verentry=$(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | grep -oE "{\"id\": \"${verescaped}\".*?${verescaped}\.json")
|
verentry=$(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | grep -oE "{\"id\": \"${verescaped}\".*${verescaped}\.json")
|
||||||
jsonurl=$(echo $verentry | grep -oE https:\/\/.*?\.json)
|
jsonurl=$(echo $verentry | grep -oE https:\/\/.*\.json)
|
||||||
curl -o "$versionjson" "$jsonurl"
|
curl -o "$versionjson" "$jsonurl"
|
||||||
echo "$versionjson - $jsonurl"
|
echo "$versionjson - $jsonurl"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user