kopia lustrzana https://github.com/miklobit/TiddlyWiki5
better help text, more params to be the same with serve.sh. typo fixes
rodzic
ed4597f12d
commit
5351102990
|
@ -4,9 +4,14 @@
|
||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
if "%1" == "--help" (
|
:: Help wanted!!
|
||||||
call :help
|
:: If someone knows, how to improve -help and -version handling tell me :)
|
||||||
)
|
|
||||||
|
if "%1" == "--help" call :help
|
||||||
|
if "%1" == "-h" call :help
|
||||||
|
|
||||||
|
if "%1" == "--version" call :version
|
||||||
|
if "%1" == "-v" call :version
|
||||||
|
|
||||||
if "%1" == "help" (
|
if "%1" == "help" (
|
||||||
call :help
|
call :help
|
||||||
|
@ -15,20 +20,32 @@ if "%1" == "help" (
|
||||||
)
|
)
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
:version
|
||||||
|
echo TiddlyWiki serve.cmd script version 0.0.1"
|
||||||
|
echo.
|
||||||
|
exit 0
|
||||||
|
goto:eof
|
||||||
|
|
||||||
:help
|
:help
|
||||||
echo Serve TiddlyWiki5 over HTTP
|
echo Serve TiddlyWiki5 over HTTP
|
||||||
echo.
|
echo.
|
||||||
echo Optional parameters
|
echo Optional parameters
|
||||||
echo - %%1 .. editions directory .. full path or relative to current directory
|
echo - %%1 .. editions directory .. full path or relative to current directory
|
||||||
echo - %%2 .. username for signing edits - can be empty like this: '""'
|
echo - %%2 .. username .. for signing edits - can be empty like this: '""'
|
||||||
echo - %%3 .. password - can be empty like this: '""'
|
echo - %%3 .. password .. can be empty like this: '""'
|
||||||
echo - %%4 .. IP address or HOST name .. defaults to localhost
|
echo - %%4 .. IP address or HOST .. defaults to localhost
|
||||||
echo - %%5 .. PORT .. defaults to 8080
|
echo - %%5 .. PORT .. defaults to 8080
|
||||||
echo.
|
echo.
|
||||||
echo Example 1 .\serve .\edition\tw5.com-server username
|
echo Example 1 .\serve .\edition\tw5.com-server username
|
||||||
echo Example 2 .\serve .\edition\tw5.com-server '""' '""' localhost 9090
|
echo Example 2 .\serve .\edition\tw5.com-server '""' '""' localhost 9090
|
||||||
echo .. Example 2 defines: empty username, empty password
|
echo .. Example 2 defines: empty username, empty password
|
||||||
echo.
|
echo.
|
||||||
|
echo Help information
|
||||||
|
echo -v, --version .. shows the script version
|
||||||
|
echo -h, --help, help .. shows this help information
|
||||||
|
echo.
|
||||||
|
|
||||||
|
exit 0
|
||||||
goto:eof
|
goto:eof
|
||||||
|
|
||||||
:main
|
:main
|
||||||
|
@ -60,7 +77,7 @@ if [%5] == [] (
|
||||||
set PORT=%5
|
set PORT=%5
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Usging edition: %TIDDLYWIKI_EDITION_PATH% !!
|
echo Using edition: %TIDDLYWIKI_EDITION_PATH% !!
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
node .\tiddlywiki.js ^
|
node .\tiddlywiki.js ^
|
||||||
|
|
Ładowanie…
Reference in New Issue