diff options
| -rwxr-xr-x | webgen | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -47,6 +47,30 @@ DEFAULT_MENU='-menu-none' PREPROCESSOR='none' # CODE: +setup() { + mkdir $TPLS + cd $TPLS + touch \#section-index + touch \#menu-index + touch ./-menu-none + touch ./-menu-mid + { + echo '<html>' + echo ' <head>' + echo ' <title>Demo page</title>' + echo ' </head>' + echo ' <body>' + } > ./-header + { + echo ' <h1>Demo page</h1>' + echo ' <p>This is the webgen demo page. This page was generated by <pre>webgen --setup</pre>.</p>' + } > ./+index + { + echo ' </body>' + echo '</html>' + } > ./-end +} + TEMPLATES_PAGE="*" TEMPLATES_DYN="*" @@ -59,6 +83,10 @@ do PREPROCESSOR="$2" shift ;; + '--setup') + setup + exit 0 + ;; '--'*) echo "Error: Unknown option: $1" >&2 exit 1 |
