Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cd3b8532c2
Fetching contributors…

Cannot retrieve contributors at this time

file 51 lines (36 sloc) 0.884 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
@echo off
setlocal

set is_rdbms=

if not '%1' == '-rdbms' goto next
set is_rdbms=1
shift

:next
if '%1' == '' goto usage
if exist %1.cpp goto error1

if '%is_rdbms%' == '1' goto skip_modeller

if exist %1.sio goto skip_modeller
if exist %1.cin goto skip_create

(echo model_info -name=%1 -version=0.1)>%1.cin
echo model_save>>%1.cin
echo Created '%1.cin'.

:skip_create
modeller < %1.cin > nul
if not exist %1.sio goto error2

:skip_modeller
xrep @create_module.xrep name=%1 modules=@modules.lst >modules.lst.new
if errorlevel 1 goto end

call update.bat modules.lst modules.lst.new

if '%is_rdbms%' == '1' goto skip_generate
call genmodule %1

:skip_generate
goto end

:error1
echo Error: Module '%1' already exists.
goto end

:error2
echo Error: Running script '%1.cin' failed to create '%1.sio'.
goto end

:usage
echo Usage: create_module [[-rdbms]] [module_name]

:end
endlocal
Something went wrong with that request. Please try again.