-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
embed-fusion-and-afx-parsers.sh
executable file
·39 lines (33 loc) · 1.6 KB
/
embed-fusion-and-afx-parsers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
export FUSION_TARGETPATH=src/Core/FusionProcessing/Fusion
export AFX_PARSER_TARGETPATH=src/Core/FusionProcessing/AfxParser
if [[ "$OSTYPE" == "darwin"* ]]; then
SEDOPTION="-i ''"
else
SEDOPTION="-i "
fi
# To create the patch file for Neos.Fusion.Afx, do:
# cd Packages/Neos
# patch -p1 < ../Libraries/neos/rector/scripts/fusion-object-parser.patch
## Now, do your modifications as needed.
# git diff -- Neos.Fusion/ > ../../rector/scripts/fusion-object-parser.patch
# git restore -- Neos.Fusion/
rm -Rf $FUSION_TARGETPATH
cp -R ../Packages/Neos/Neos.Fusion/Classes/Core $FUSION_TARGETPATH
pushd $FUSION_TARGETPATH
patch -p4 < ../../../../scripts/fusion-object-parser.patch
popd
grep -rl 'Neos\\Fusion\\Core' $FUSION_TARGETPATH | xargs sed $SEDOPTION 's/Neos\\Fusion\\Core/Neos\\Rector\\Core\\FusionProcessing\\Fusion/g'
grep -rl 'Fusion\\Core' $FUSION_TARGETPATH | xargs sed $SEDOPTION 's/Fusion\\Core/\\Neos\\Rector\\Core\\FusionProcessing\\Fusion/g'
# To create the patch file for Neos.Fusion.Afx, do:
# cd Packages/Neos
# patch -p1 < ../Libraries/neos/rector/scripts/afx-eel-positions.patch
## Now, do your modifications as needed.
# git diff -- Neos.Fusion.Afx/ > ../../rector/scripts/afx-eel-positions.patch
# git restore -- Neos.Fusion.Afx/
rm -Rf $AFX_PARSER_TARGETPATH
cp -R ../Packages/Neos/Neos.Fusion.Afx/Classes/Parser $AFX_PARSER_TARGETPATH
pushd $AFX_PARSER_TARGETPATH
patch -p4 < ../../../../scripts/afx-eel-positions.patch
popd
grep -rl 'Neos\\Fusion\\Afx\\Parser' $AFX_PARSER_TARGETPATH | xargs sed $SEDOPTION 's/Neos\\Fusion\\Afx\\Parser/Neos\\Rector\\Core\\FusionProcessing\\AfxParser/g'