fixed php eval script
This commit is contained in:
parent
8f797208e3
commit
7ccd34476a
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,8 @@ cp -rL raw ${TMP_DIR_NAME}
|
||||||
|
|
||||||
for file in $(find ${TMP_DIR_NAME} -name '*.php'); do
|
for file in $(find ${TMP_DIR_NAME} -name '*.php'); do
|
||||||
echo "Evaluating php file $file"
|
echo "Evaluating php file $file"
|
||||||
|
__cur_dir=$(pwd)
|
||||||
|
cd $(dirname ${file})
|
||||||
RESULT=$(php "${file}" 2> /dev/null)
|
RESULT=$(php "${file}" 2> /dev/null)
|
||||||
CODE=$?
|
CODE=$?
|
||||||
if [[ ${CODE} -ne 0 ]]; then
|
if [[ ${CODE} -ne 0 ]]; then
|
||||||
|
@ -58,6 +60,7 @@ for file in $(find ${TMP_DIR_NAME} -name '*.php'); do
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd ${__cur_dir}
|
||||||
echo "${RESULT}" > "${file::-4}.html"
|
echo "${RESULT}" > "${file::-4}.html"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue