diff options
| author | Philipp Schafft <lion@lion.leolix.org> | 2009-03-12 15:44:44 +0000 |
|---|---|---|
| committer | Philipp Schafft <lion@lion.leolix.org> | 2017-03-27 02:03:48 +0000 |
| commit | 0ec061140a144b871888fcecef1abf96ea89b5a4 (patch) | |
| tree | a231185e4db69a6dcb7294698d34c426482e2a3e | |
| parent | d205fd6779031b8ae4dd447d8434eac1614c1d80 (diff) | |
got +TPL -> tpl.html replacement working
| -rwxr-xr-x | webgen | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -7,6 +7,7 @@ TPLS=tpl/ HEADER=header END=end +PAGE_SUFFIX='.html' # CODE: cd $TPLS @@ -14,13 +15,15 @@ cd $TPLS for i in +* do CLEANTPLNAME=$(echo "$i" | sed 's/^[\-\+]//') - OF="$OUT"/"$CLEANTPLNAME"".html" + OF="$OUT"/"$CLEANTPLNAME""$PAGE_SUFFIX" echo "Compiling $CLEANTPLNAME -> $OF" { cat -- -$HEADER - cat -- $i + cat -- $i cat -- -$END - } > $OF + } | \ +# sed 's#href="+\(.*\)"#href="\1'"$PAGE_SUFFIX"'"#g' > $OF + perl -pe's#href="\+(.+?)"#href="$1'"$PAGE_SUFFIX"'"#g' > $OF done #ll |
