summaryrefslogtreecommitdiff
path: root/webgen
diff options
context:
space:
mode:
Diffstat (limited to 'webgen')
-rwxr-xr-xwebgen28
1 files changed, 28 insertions, 0 deletions
diff --git a/webgen b/webgen
index 02c5b1e..8e83d1c 100755
--- a/webgen
+++ b/webgen
@@ -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