fixes and new entities

master
Theunis J. Botha 2021-09-10 07:18:24 +02:00
parent e3a09be293
commit 781c8fc918
3 changed files with 10 additions and 5 deletions

View File

@ -21,7 +21,7 @@ r3_completions() {
fi
if [ "${#COMP_WORDS[@]}" == "5" ] && [ "${COMP_WORDS[3]}" == "extends" ] ; then
local classes=$(grep "^class" "${R3_INSTALL_PATH}"/r3-libs/r3-v2/src/r3/*.js "${R3_INSTALL_PATH}"/r3-libs/r3-v2/src/r3/r3-component/*.js "${R3_INSTALL_PATH}"/r3-libs/r3-v2/src/r3/r3-runtime/*.js | perl -pe "s/.*class\s*(\w.*?)\s.*/\1/" | perl -pe 's/\n/ /g')
local classes=$(grep "^class" "${R3_INSTALL_PATH}"/r3-libs/r3-v2/src/r3/*.js "${R3_INSTALL_PATH}"/r3-libs/r3-v2/src/r3/r3-component/*.js "${R3_INSTALL_PATH}"/r3-libs/r3-v2/src/r3/r3-runtime/*.js "${R3_INSTALL_PATH}"/r3-libs/r3-v2/src/r3/r3-entity/*.js | perl -pe "s/.*class\s*(\w.*?)\s.*/\1/" | perl -pe 's/\n/ /g')
COMPREPLY=($(compgen -W "${classes}" "${COMP_WORDS[4]}"))
fi

@ -1 +1 @@
Subproject commit 48068f057db9e5cf56038b3cc6d657b66c045029
Subproject commit b384d331acdb3b6e08f6376ab09d507ad4447f9e

11
r3.sh
View File

@ -66,6 +66,7 @@ R3_FOLDER="${R3_V2_SRC_PATH}/r3/"
R3_SYSTEM_FOLDER="${R3_V2_SRC_PATH}/r3/r3-system/"
R3_COMPONENT_FOLDER="${R3_V2_SRC_PATH}/r3/r3-component/"
R3_RUNTIME_FOLDER="${R3_V2_SRC_PATH}/r3/r3-runtime/"
R3_ENTITY_FOLDER="${R3_V2_SRC_PATH}/r3/r3-entity/"
TEMPLATE_FOLDER="${R3_V2_SRC_PATH}/templates/"
CWD=$(pwd)
@ -252,6 +253,10 @@ check_file_found() {
FILE="${R3_RUNTIME_FOLDER}${ORIG_FILE}"
fi
if [ ! -f "${FILE}" ]; then
FILE="${R3_ENTITY_FOLDER}${ORIG_FILE}"
fi
if [ ! -f "${FILE}" ]; then
exit 4
fi
@ -321,7 +326,7 @@ then
./r3.php "${FILE}" save
RESULT=$?
if [ "${RESULT}" = 1 ];
if [ "${RESULT}" != 1 ];
then
exit 5
fi
@ -336,7 +341,7 @@ then
echo "New command is : ${COMMAND}"
$COMMAND
RESULT=$?
if [ "${RESULT}" = 1 ];
if [ "${RESULT}" != 1 ];
then
exit 5
fi
@ -345,7 +350,7 @@ then
./r3.php "${FILE}" restore "'${COMMAND}'"
RESULT=$?
if [ "${RESULT}" = 1 ];
if [ "${RESULT}" != 1 ];
then
exit 5
fi