very stable generation now for options and methods

master
Theunis J. Botha 2021-06-29 10:57:45 +02:00
parent a929242ad3
commit a4a18dc163
2 changed files with 29 additions and 6 deletions

@ -1 +1 @@
Subproject commit 9107d31d22bd3fab853b1f5dc30f20dfdd7b604c
Subproject commit fabb7b79aca95a9f22511334eef4fda44a579107

33
r3.sh
View File

@ -44,9 +44,16 @@ cleanup() {
if [ "${LAST_ERROR}" = 4 ] ;
then
echo "File not found"
echo "File not found : ${FILE}"
fi
if [ "${LAST_ERROR}" = 5 ] ;
then
echo "Warning! An error occurred during restore and the process is stopped to prevent potential data loss"
echo "Scroll up for the reason and take action accordingly"
fi
cd "${CWD}" 2>&1 || exit
}
@ -189,7 +196,7 @@ then
cd - 2>&1 || exit 3
set -o xtrace
# set -o xtrace
CONTENTS=$(cat "${R3_FOLDER}events-generated")
perl -i -pe "BEGIN{undef $/;} s/\/\/EVENT_GENERATED_START.*\/\/EVENT_GENERATED_END/\/\/EVENT_GENERATED_START\n${CONTENTS}\n\/\/EVENT_GENERATED_END/smg" "${R3_FOLDER}r3-event.js"
@ -249,12 +256,28 @@ then
echo "File = ${FILE}";
echo "Command = ${COMMAND}";
set -o xtrace
# set -o xtrace
./update_templates.php "${FILE}" save
$COMMAND
./update_templates.php "${FILE}" restore
RESULT=$?
if [ "${RESULT}" = 1 ];
then
exit 5
fi
$COMMAND
RESULT=$?
if [ "${RESULT}" = 1 ];
then
exit 5
fi
./update_templates.php "${FILE}" restore
RESULT=$?
if [ "${RESULT}" = 1 ];
then
exit 5
fi
fi
done