From b26af23d2d116675f7185e0cbbd64a2d53db1ca4 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 24 Oct 2018 18:05:10 +0300 Subject: [PATCH] [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). --- scripts/decompile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/decompile.sh b/scripts/decompile.sh index 73cf1d7a9c..54dbf7b11d 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -25,8 +25,8 @@ versionjson="$workdir/Minecraft/$minecraftversion/$minecraftversion.json" if [ ! -f "$versionjson" ]; then echo "Downloading $minecraftversion JSON Data" verescaped=$(echo ${minecraftversion} | sed 's/\./\\./g') - 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) + 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) curl -o "$versionjson" "$jsonurl" echo "$versionjson - $jsonurl" fi