2013-08-26 02:20:13 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$LIME_DIR" = "" ]; then
|
2018-08-03 00:15:08 +03:00
|
|
|
LIME_DIR=./lime/
|
2013-08-26 02:20:13 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
php -d xdebug.max_nesting_level=200 $LIME_DIR/lime.php template.lime | tail -n +2 > template.class
|
2018-09-13 02:32:00 +03:00
|
|
|
LINES=`grep -n -h " \*\*\* DON'T EDIT THIS FILE! \*\*\*" VMXTemplateCompiler.php | perl -pe 's/(\d+):.*/$1-2/e'`
|
2013-08-26 02:20:13 +04:00
|
|
|
if [ "$LINES" != "" ]; then
|
2018-09-13 02:32:00 +03:00
|
|
|
head -n $LINES VMXTemplateCompiler.php | cat - template.class > VMXTemplateCompiler.php.new
|
2013-08-26 02:20:13 +04:00
|
|
|
else
|
2018-09-13 02:32:00 +03:00
|
|
|
cat VMXTemplateCompiler.php template.class > VMXTemplateCompiler.php.new
|
2013-08-26 02:20:13 +04:00
|
|
|
fi
|
2018-09-13 02:32:00 +03:00
|
|
|
mv VMXTemplateCompiler.php.new VMXTemplateCompiler.php
|