diff options
1 files changed, 13 insertions, 0 deletions
| -rw-r--r-- | homework/81281/c2html/c2htmlrun.sh | 13 |
diff --git a/homework/81281/c2html/c2htmlrun.sh b/homework/81281/c2html/c2htmlrun.sh new file mode 100644 index 0000000..dec4b69 --- /dev/null +++ b/homework/81281/c2html/c2htmlrun.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +echo -n "Please enter the name of the C file you wish to highlight: " +read fileName +echo -ne "Please enter:\n\t0 for highlighting\n\t1 highlighting and prettification\n\t2 for highlighting and prettification and control structure collapse: " +read number +if ! [[ $fileName == *.c\n ]]; then + base=`pwd`"/c2html.pl" + PL=swipl + exec $PL -q -f "$base" "$fileName" "$number" +else + echo "Not a correct C filename!" +fi |
