summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2013-08-20 02:55:04 +0000
committerXuefer <xuefer@gmail.com>2013-08-20 02:55:04 +0000
commit68de62de576d60f31266e247c7b9f308a0e68dd6 (patch)
tree091395e0e02a13de0f1b57cea7e5bcb363ad0b2e /devel
parenta0217c26540d56ca39a7654f8066f6df1c6d293e (diff)
downloadxcache-68de62de576d60f31266e247c7b9f308a0e68dd6.tar.gz
xcache-68de62de576d60f31266e247c7b9f308a0e68dd6.zip
decompiler: more sample templating trick
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1344 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/run4
1 files changed, 3 insertions, 1 deletions
diff --git a/devel/run b/devel/run
index 1e3fbd7..5765442 100755
--- a/devel/run
+++ b/devel/run
@@ -244,7 +244,9 @@ run() {
shift
case "$1" in
*.cpp.php)
- cpp -C -P -traditional-cpp -DPHP_VERSION=$phpVersion $1 \
+ < "$1" \
+ sed -r -e 's#__#____#g' \
+ | cpp -C -P -traditional-cpp -DPHP_VERSION=$phpVersion \
| sed -r -e 's#^ +##g' -e 's#\t +#\t#g' -e 's#____#__#g' > sample.php || exit $?
shift
./php-cli -c devel.ini ./bin/phpdc.phpr sample.php "$@" | tee decompiled.php