| 1 | #!/bin/bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | rm -f *.pas |
| 5 | wget https://raw.githubusercontent.com/BeRo1985/pasgltf/master/src/PasGLTF.pas --output-document=CastlePasGLTF.pas |
| 6 | wget https://raw.githubusercontent.com/BeRo1985/pasjson/master/src/PasJSON.pas --output-document=CastlePasJSON.pas |
| 7 | wget https://raw.githubusercontent.com/BeRo1985/pasdblstrutils/master/src/PasDblStrUtils.pas --output-document=CastlePasDblStrUtils.pas |
| 8 | |
| 9 | # Fix "unit xxx" |
| 10 | sed -i -e 's|unit PasGLTF|unit CastlePasGLTF|g' CastlePasGLTF.pas |
| 11 | sed -i -e 's|unit PasJSON|unit CastlePasJSON|g' CastlePasJSON.pas |
| 12 | sed -i -e 's|unit PasDblStrUtils|unit CastlePasDblStrUtils|g' CastlePasDblStrUtils.pas |
| 13 | |
| 14 | # Fix "uses xxx" |
| 15 | sed -i -e 's|uses PasDblStrUtils|uses CastlePasDblStrUtils|g' CastlePasJSON.pas |
| 16 | |
| 17 | # See https://castle-engine.io/coding_conventions#no_longint_longword |
| 18 | sed -i -e 's|longint|Integer|g' CastlePasJSON.pas |
| 19 | sed -i -e 's|longword|Cardinal|g' CastlePasJSON.pas |