fixed php eval script

canary
WolverinDEV 2019-10-26 03:07:46 +02:00
parent 8f797208e3
commit 7ccd34476a
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,8 @@ cp -rL raw ${TMP_DIR_NAME}
for file in $(find ${TMP_DIR_NAME} -name '*.php'); do
echo "Evaluating php file $file"
__cur_dir=$(pwd)
cd $(dirname ${file})
RESULT=$(php "${file}" 2> /dev/null)
CODE=$?
if [[ ${CODE} -ne 0 ]]; then
@ -58,6 +60,7 @@ for file in $(find ${TMP_DIR_NAME} -name '*.php'); do
exit 1
fi
cd ${__cur_dir}
echo "${RESULT}" > "${file::-4}.html"
done