Skip to content

flexjs migration shell

Harbs edited this page Oct 17, 2017 · 6 revisions

Migration Shell Script for FlexJS Projects

To run the script, save the script to a file ( i.e. migrateflexjs.sh) and place the script in the main directory of your project. Run the script from the command line using . migrateflexjs.sh

#!/bin/bash

find . -name "*" -type f -exec perl -i -ne 's/org\.apache\.flex/org\.apache\.royale/g;print;' {} \;
find . -name "*" -type f -exec perl -i -ne 's/\@royaleignorecoercion/\@royaleignorecoercion/g;print;' {} \;
find . -name "*" -type f -exec perl -i -ne 's/IRoyaleEvent/IRoyaleEvent/g;print;' {} \;
find . -name "*" -type f -exec perl -i -ne 's/ns\.apache\.org\/flexjs/ns\.apache\.org\/royale/g;print;' {} \;
find . -name "*" -type f -exec perl -i -ne 's/ROYALE_HOME/ROYALE_HOME/g;print;' {} \;
find . -name "*" -type f -exec perl -i -ne 's/royale-config/royale-config/g;print;' {} \;
find . -name "asconfig.json" -type f -exec perl -i -ne 's/flexjs/royale/g;print;' {} \;
find . -name "asconfig.json" -type f -exec perl -i -ne 's/"config":\s?"flex"/"config": "royale"/g;print;' {} \;
find . -name "asconfig.json" -type f -exec perl -i -ne 's/JSFlex/JSRoyale/g;print;' {} \;
find . -name "tasks.json" -type f -exec perl -i -ne 's/--flexHome/--royaleHome/g;print;' {} \;
Clone this wiki locally