diff options
| author | Philipp Schafft <lion@lion.leolix.org> | 2016-06-17 22:59:23 +0000 |
|---|---|---|
| committer | Philipp Schafft <lion@lion.leolix.org> | 2017-03-27 02:11:20 +0000 |
| commit | 56229d3b3e55b924fe85e1e3b2fa97b42cd821d7 (patch) | |
| tree | 61782b03b9601544642716081b850a91a3da2995 /webgen | |
| parent | 6a1f0f2279355c9133ccc60612f4fa1127e9a6b3 (diff) | |
Feature: added --setup to webgen
Diffstat (limited to 'webgen')
| -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 |
