Lepsi tester seriovky
[mirrors/Programs.git] / bash / bash-httpd / bhp / bhp
CommitLineData
21c4e167
H
1#!/bin/bash
2#BHP - BASH Home Page - Engine
3
4export BHP_LIB=$(dirname $0)'/bhplib.bhp';
5
6exec=0;
7cat "$1" | sed -e 's/<?bhp/\n<?bhp\n/g;s/?>/\n?>\n/g' | while read line; do
8 case "$line" in
9 '<?bhp') exec=1; continue ;;
10 '?>') exec=0; continue ;;
11 '') continue ;;
12 esac
13 case $exec in
14 1) echo "$line" ;;
15 0) echo "echo '"$( echo "$line" | sed -e "s/'/'\\\\''/g" )"'" ;;
16 esac
17done | bash
18
This page took 0.424345 seconds and 4 git commands to generate.