rc3-its-assembly-2021/script/reviewed/replace_slugs2.sh

22 lines
1.2 KiB
Bash
Raw Normal View History

2022-01-04 18:50:39 +01:00
sed -i \
-e 's/"world:\\\/\\\/cccsbg\\\/\(.*\)"/"\\\/_\\\/global\\\/finga.github.io\\\/rc3-cccsbg\\\/\1"/g' \
-e 's/"world:\\\/\\\/devlol\\\/\(.*\)"/"\\\/_\\\/global\\\/devlol-systems.pages.devlol.org\\\/vspace-workadv\\\/\1"/g' \
-e 's/"world:\\\/\\\/grandgarage\\\/\(.*\)"/"\\\/_\\\/global\\\/grand-garage.github.io\\\/gg-workadventure\\\/\1"/g' \
-e 's/"world:\\\/\\\/Metalab\\\/\(.*\)"/"\\\/_\\\/global\\\/metalab.github.io\\\/maptest\\\/\1"/g' \
-e 's/"world:\\\/\\\/realraum\\\/\(.*\)"/"\\\/_\\\/global\\\/realraum.github.io\\\/workadventur3space\\\/\1"/g' \
-e 's/"world:\\\/\\\/steyr-werke\\\/\(.*\)"/"\\\/_\\\/global\\\/steyr-werke.gitlab.io\\\/workadventure-stw\\\/\1"/g' \
-e 's/"world:\\\/\\\/chaoszone\\\/\(.*\)"/"\\\/_\\\/global\\\/raw.githubusercontent.com\\\/die3ungleichen\\\/2D-Welt-thueringen\\\/main\\\/\1"/g' \
-e 's/"world:\\\/\\\/ccc-basel\\\/\(.*\)"/"\\\/_\\\/global\\\/rc3.ccc-basel.ch\\\/\1"/g' \
$@
for f in $@
do
tmp=$(mktemp)
jq -ce '
.properties +=
[{"name":"apiUrl","type":"string","value":"https://play.aaaaaaaaaaaadventu.re"}]
| (.layers[] | select(.properties != null and .properties[].name=="jitsiRoom") | .properties) +=
[{"name":"jitsiUrl","type":"string","value":"meet.jit.si"}]
' $f >$tmp
mv $tmp $f
done