home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / sbackup_432.lzh / SBackup / sbackup.doc < prev    next >
Text File  |  1991-01-12  |  10KB  |  232 lines

  1.  
  2.           SBACKUP  Copyright (c) 1990  by George Kerber    12/23/90
  3.  
  4.  ---------------------------------------------------------------------------
  5.   SHAREWARE   SHAREWARE    SHAREWARE    SHAREWARE    SHAREWARE    SHAREWARE  
  6.  ---------------------------------------------------------------------------
  7.  
  8.  SBACKUP is SHAREWARE.  If you try this program and continue to use it for
  9.  over 30 days you are required to register your copy and make payment of
  10.  $5 for use of the program.  Please make payment of $5 to:
  11.  
  12.                     George Kerber          19756 E. Linvale Drive
  13.                     303-693-2890          Aurora, Colorado  80013
  14.  
  15.  ---------------------------------------------------------------------------
  16.   SHAREWARE   SHAREWARE    SHAREWARE    SHAREWARE    SHAREWARE    SHAREWARE  
  17.  ---------------------------------------------------------------------------
  18.  
  19.  
  20.        Program:  SBACKUP.EXE
  21.     Programmer:  George Kerber
  22.        Written:  12/23/90 - 12/24/90
  23.    Application:  MS-DOS (3.0+)  &  AmigaDOS (1.2+)
  24.        Purpose:  Makes backing up your source code files easy
  25.                  (so you'll do it....).
  26.  
  27.   Requirements:  MS-DOS 3.0 or higher. 
  28.                  AmigaDOS 1.2 or higher. (2.0 compatible)
  29.  
  30.     How many times have you modified an existing source code file and
  31.     then wished you could remove the changes?  Sure, you could manually copy
  32.     the source file each time you begin to make changes.  But you'd
  33.     have to manage a file naming scheme to insure that you could always tell
  34.     the generation of the backup files.  SBACKUP assists you in this goal.
  35.     Simply execute SBACKUP with the name of your source code as it's only
  36.     argument.  SBACKUP will copy the source file to the same filename with
  37.     an extension of .001, and shift up any existing backup filenames by 1.
  38.  
  39.     Once SBACKUP has created at least one backup file, it will make any
  40.     more copies of the source code unless the sourcefile has been
  41.     modified.  See the section below for a complete example.
  42.  
  43.     SBACKUP supports up to 20 backup files.  Once you have 20 backup files,
  44.     SBACKUP will delete the 20th backup file to make room for the new
  45.     backup.  See the section below for information on how to change the
  46.     maxfiles from 20 to a value of your choice.  SBACKUP never modifies
  47.     your sourcefile in any way. SBACKUP will backup any textfile, but is
  48.     especially written to backup C, BASIC and PASCAL source code files.
  49.     SBACKUP doesn't eliminate the need to be religious about doing hard
  50.     disk backups, it just makes keeping multiple versions of source code
  51.     handy and available.
  52.  
  53.  
  54.             SYNTAX:  SBACKUP [-number_backups] filename [destination_dir]
  55.             -------
  56.  
  57.       Installation:  MS-DOS:  Copy SBACKUP.EXE to a directory in your
  58.       -------------  current PATH.  
  59.  
  60.                      AmigaDOS:  Copy SBACKUP to your c: directory or any
  61.                      directory in your current PATH.
  62.  
  63.    Suggested Usage:  Create a batch file for each source project you wish
  64.    ----------------  to create backups for.  For example, suppose you had
  65.                      a "C" source file called program.c.  Create a batch
  66.                      file called SAVE.BAT* which contains the following:
  67.  
  68.                      ECHO OFF*
  69.                      SBACKUP program.c
  70.  
  71.                      You can now do a source code backup of your program.c
  72.                      file by entering 'SAVE' at the DOS prompt.  You should
  73.                      keep this SAVE.BAT* in the directory that your source
  74.                      code is kept.  This way you can have a SAVE.BAT* batch
  75.                      file in every directory you maintain source code in.
  76.                      If you have multiple source files for a project, just
  77.                      add a line calling SBACKUP in the batch file for each
  78.                      filename or create a separate batch file with a
  79.                      different name for each sourcefile.
  80.  
  81.                      If a number (preceded by a -) is entered on the
  82.                      command line before the sourcefile name, SBACKUP
  83.                      will use the new number as the maximum number of
  84.                      files to retain.  The maximum must be between 2-99.
  85.                      The maxfiles can also be changed by setting an
  86.                      environmental variable as described below.
  87.                     
  88.                      If a destination directory is specified after the 
  89.                      filename, all backup files will be written to the
  90.                      specified directory, instead of the current directory.
  91.                      A backup directory can be created to store all backup
  92.                      files to avoid cluttering up your current directory.
  93.  
  94.                      -------------------------------------------------------
  95.  
  96.                    * AmigaDOS batch files do not use the .BAT extension and
  97.                      don't need the 'ECHO OFF' statement.  The batch file
  98.                      can be executed by entering:
  99.  
  100.                            1>  execute batchfile
  101.  
  102.                                or just
  103.  
  104.                            1>  batchfile
  105.  
  106.                       if the script bit is set (AmigaDOS 1.3 or higher).
  107.  
  108.                       The script protection bit can be set by entering:
  109.  
  110.                            1>  protect batchfile +s
  111.  
  112.                       See your AmigaDOS manual for more information.
  113.        
  114.                      
  115.   Backup Filenames:  Standard programming language source code files are
  116.   -----------------  handled in a special way.  If the file extension is
  117.                      C ("C"), BAS (BASIC), or P (PASCAL),  the first
  118.                      character of the backup extension will be C, B, or P.
  119.                      The date and time of the backup will be written to the
  120.                      end of the back up file as a remark in the standard
  121.                      syntax of the language.  For example:
  122.  
  123.                      SBACKUP SOURCE.C    ->  SOURCE.C01 ...
  124.                      /*  SBACKUP  mm/dd/yy  hh:mm:ss  */
  125.  
  126.                      SBACKUP SOURCE.BAS  ->  SOURCE.B01 ...
  127.                      REM  SBACKUP  mm/dd/yy  hh:mm:ss
  128.  
  129.                      SBACKUP SOURCE.PAS  ->  SOURCE.P01 ...
  130.                      (*  SBACKUP  mm/dd/yy  hh:mm:ss  *)
  131.  
  132.                      SBACKUP SOURCE.DOC  ->  SOURCE.D01 ...
  133.                      n/a
  134.  
  135.                      SBACKUP SOURCE.TXT  ->  SOURCE.T01 ...
  136.                      n/a
  137.  
  138.                      SBACKUP SOURCE.readme ->  SOURCE.001 ...
  139.                      n/a
  140.  
  141.   Change # Backups:  SBACKUP will retain the last 20 backups.  This value
  142.   -----------------  can be changed by the user by setting the SBACKUP
  143.                      environmental variable with the desired value or via
  144.                      a command line option as described above.
  145.  
  146.                      MS-DOS:         c> set SBACKUP=n
  147.                      ------- 
  148.  
  149.                      AmigaDOS:       1> setenv SBACKUP=n
  150.                      ---------
  151.  
  152.                      Where 'n' = the number of backups you desire to be
  153.                      kept.  The value must be between 2-99.  
  154.  
  155.                      The set/setenv command can be set on the DOS command
  156.                      line or in your autoexec.bat file/startup-sequence
  157.                      file.
  158.  
  159.  
  160.     AmigaDOS Notes:  SBACKUP will actually use the AmigaDOS 'COPY' command
  161.     ---------------  to copy the files if it can be found in the current 
  162.                      PATH.  If 'COPY' cannot be located, SBACKUP will
  163.                      copy the files itself, but the copy will be slower.
  164.                      SBACKUP can use the AmigaDOS and ARP COPY commands
  165.                      with no problems.
  166.  
  167.  
  168.  ----------------------------------------------------------------------------
  169.  MS-DOS Example:  Suppose you had a directory where you kept the "C" source
  170.  code and documentation for a program named widget.  The program used the
  171.  following files:
  172.  
  173.                 MAIN.C 
  174.                 FUNCTIONS.C 
  175.                 OTHER.C
  176.                 MATH.C
  177.                 WIDGET.DOC
  178.  
  179.  Create this batch file named SAVE.BAT to keep the source and documents
  180.  backed up to a directory named C:\SOURCE\BACKUP.
  181.  
  182.   ECHO OFF
  183.   CLS
  184.   SBACKUP MAIN.C C:\SOURCE\BACKUP          : save up to 20 versions
  185.   SBACKUP FUNCTIONS.C C:\SOURCE\BACKUP
  186.   SBACKUP OTHER.C C:\SOURCE\BACKUP
  187.   SBACKUP MATH.C C:\SOURCE\BACKUP
  188.   SBACKUP -5 WIDGET.DOC C:\SOURCE\BACKUP   : save only 5 versions
  189.  
  190.  Now whenever you execute the SAVE.BAT batch file, SBACKUP will check if
  191.  the current backup is current and if not, it will copy the files to the
  192.  C:\SOURCE\BACKUP directory with the correct extension.
  193.  
  194.  The first time you use SAVE.BAT the following files will be created:
  195.  
  196.                 C:\SOURCE\BACKUP\MAIN.C01
  197.                 C:\SOURCE\BACKUP\FUNCTIONS.C01
  198.                 C:\SOURCE\BACKUP\OTHER.C01
  199.                 C:\SOURCE\BACKUP\MATH.C01
  200.                 C:\SOURCE\BACKUP\WIDGET.D01
  201.  
  202.  If you execute SAVE.BAT again, SBACKUP will inform you that all files are
  203.  UP-TO-DATE.  SBACKUP will only do another copy if the file has been changed.
  204.  
  205.  Suppose you modified MATH.C, and then executed SAVE.BAT again.  SBACKUP
  206.  would inform you that all other files were UP-TO-DATE.  SBACKUP would
  207.  rename C:\SOURCE\BACKUP\MATH.C01 to C:\SOURCE\BACKUP\MATH.C02 and then
  208.  copy MATH.C to C:\SOURCE\BACKUP\MATH.C01.
  209.  
  210.  The latest version of all backups will always have the lowest extension.
  211.  
  212.  ---------------------------------------------------------------------------
  213.   SHAREWARE   SHAREWARE    SHAREWARE    SHAREWARE    SHAREWARE    SHAREWARE  
  214.  ---------------------------------------------------------------------------
  215.  
  216.  SBACKUP is SHAREWARE.  You have permission to use this program for a period
  217.  of 30 days.  After 30 days you must send the author $5 for the use of the 
  218.  program and to register your copy.  I assume no responsibility for the use
  219.  of this program or it's operation (I hate responsibility).
  220.  
  221.  
  222.                            George Kerber
  223.                            19756 E. Linvale Drive
  224.                            Aurora, Colorado  80013
  225.                            (303) 693-2890
  226.  
  227.                            Compuserve:  74010,2132
  228.  
  229. ---------------------------------------------------------------------------
  230.  
  231.  
  232.