RGBASE v1.0 - Renegade Message/File Base Creator
================================================
Replaces RGMBASE and RGFBADD with one program.  DOS, Win32 and Linux.

** BACK UP YOUR DATA DIRECTORY FIRST.  Run with the BBS offline. **
Where RENEGADE.DAT is found (first match wins):
  /D:bbsdir on the command line
  RGBASE.CFG  RenegadeDat=D:\RG\RENEGADE.DAT   (or BBSDir=D:\RG\)
              read from the current dir, then RGBASE's own dir
  RENEGADE=bbsdir environment variable
  the current directory
With RGBASE.CFG set, RGBASE can run from anywhere.  Templates,
MSG.TXT and FILE.TXT are looked for in the current dir first, then
in RGBASE's dir.

1. Make your templates (once)
-----------------------------
  RGBASE EXPORT MSG        writes MSGBASE.TPL from MBASES.DEF
                           (Message Base Editor, option X default)
  RGBASE EXPORT FILE       writes FILEBASE.TPL with stock defaults
  RGBASE EXPORT MSG  ECHO.TPL /A:5    copy settings from msg base #5
  RGBASE EXPORT FILE CD.TPL   /A:12   copy settings from file base #12

Templates are plain KEY=VALUE text - edit them with any editor.
In a path, @F is replaced with the base's data file name, e.g.
  DLPath=D:\RG\FILES\@F\      ->  D:\RG\FILES\GAMES\
Missing directories are created.

2. Create bases
---------------
  RGBASE MSG  "|11First |09Base" BASEBALL
  RGBASE MSG  "FidoNet General" FN_GEN /T:ECHO.TPL
  RGBASE MSG  "Local Chat" CHAT /P:D:\RG\ECHO\CHAT\
  RGBASE FILE "Door Games" GAMES
  RGBASE FILE "Utilities" UTILS /DL:D:\FILES\UTILS\ /UL:D:\UPLOAD\
  RGBASE FILE "CD Shareware" CDSW /T:CD.TPL

Only a name and an 8 character data file name are needed - the rest
comes from the template (MSGBASE.TPL / FILEBASE.TPL, or /T:file).
If no template file exists, Renegade's own defaults are used.

  /T:file   template      /P:path   echomail path (msg)
  /DL:path  download path /UL:path  upload path (default = DL path)

3. Many at once - MSG.TXT / FILE.TXT
------------------------------------
Put one area per block in MSG.TXT (message) or FILE.TXT (file):
base name on one line, data file name on the next, a blank line
between areas.  |xx color codes are OK in the name.

  |11First |09Base
  BASEBALL

  |10Fun Times!
  FUNTIME

Everything else comes from the template.  When you pick M or F at
the RGBASE prompt and MSG.TXT / FILE.TXT exists, RGBASE asks if you
want to use it and then creates every base in it.  From the command
line:  RGBASE MSGTXT [file] [/T:tpl]   RGBASE FILETXT [file] [/T:tpl]

4. Mixed list with paths
------------------------
  RGBASE IMPORT BASES.LST

  ; M  FILENAME  Name
  ; F  FILENAME  DLPATH  ULPATH  Name     (- = use template)
  ; T  M|F  template                      template for lines below
  M  BASEBALL  |11First |09Base
  M  FUNTIME   |10Fun Times!
  T  M  ECHO.TPL
  M  FN_GEN    FidoNet General
  F  GAMES     -  -  Door Games
  F  UTILS     D:\FILES\UTILS\  D:\UPLOAD\  Utilities

Other
-----
  RGBASE LIST MSG | LIST FILE   show existing bases
  RGBASE                        interactive - asks for each value

New bases go at the end of the list.  A base whose data file name
already exists is skipped (never overwritten).  For each base RGBASE
writes the record to MBASES.DAT / FBASES.DAT and creates the
.HDR/.DAT/.SCN (msg) or .DIR/.EXT/.SCN (file) files with one new-scan
record per user, the same as the Renegade editors do.

Exit code: 0 ok, 1 usage/RENEGADE.DAT error, 2 one or more errors.
