ubuntuusers.de

Titel:
smartify.sh
Datum:
21. Februar 2012 17:00
Aktionen:
Code:
1
2
3
4
5
6
7
8
9
#!/bin/bash
cp "$1" "{$1}_backup
sed -i "s#' \. \([A-Z_]*\) \. '#{\$CONST.\1}#g" "$1"
sed -i "s#<?php echo \([A-Z_]*\) ?>#{\$CONST.\1}#g" "$1"
sed -i "s#<?php echo serendipity_getTemplateFile('\(.*\)'); ?>#{serendipity_getFile file=\"\1\"}#g" "$1"
sed -i "s#' . serendipity_getTemplateFile('\(.*\)') . '#{serendipity_getFile file=\"\1\"}#g" "$1"
sed -i "s#htmlspecialchars(\([^)]*\))#{\1|escape:\"html\"}#g" "$1"

sed -i "s#echo '\(.*\)';#\1#g" "$1"