home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / utils / hwgrcs / bin / rcsfreeze < prev    next >
Encoding:
AmigaDOS Script File  |  1993-02-10  |  2.1 KB  |  92 lines

  1. .key arg
  2. .bra {
  3. .ket }
  4. ;
  5. ;   This is an AmigaOS replacement for the rcsfreeze script.
  6. ;   It works if you don't mess too much with local shell variables.
  7. ;
  8. ;   $Id: rcsfreeze,v 1.5 1993/01/18 20:09:47 heinz Exp $
  9. ;
  10.  
  11. if exists RCS_link
  12.     set RCSDIR `type RCS_link`
  13. else
  14.     if exists RCS
  15.     set RCSDIR RCS
  16.     else
  17.     set RCSDIR ""
  18.     endif
  19. endif
  20.  
  21. set AKTDIR `cd`
  22.  
  23. cd >NIL: $RCSDIR
  24.  
  25. Set VERSIONFILE .rcsfreeze.ver
  26. Set LOGFILE    .rcsfreeze.log
  27.  
  28. if not exists $VERSIONFILE
  29.     echo >$VERSIONFILE "0"
  30.     echo >$LOGFILE ""
  31. endif
  32.  
  33. set VERSIONNUMBER `type $VERSIONFILE`
  34. set VERSIONNUMBER `eval $VERSIONNUMBER + 1`
  35. echo >$VERSIONFILE $VERSIONNUMBER
  36.  
  37. Set SYMREV  C_$VERSIONNUMBER
  38.  
  39. if "{arg}" gt ""
  40.     Set SYMREVNAME  "{arg}"
  41. else
  42.     Set SYMREVNAME  $SYMREV
  43. endif
  44.  
  45. echo "rcsfreeze: symbolic revision number computed: '$SYMREV'"
  46. echo "           symbolic revision number used:     '$SYMREVNAME'"
  47. echo ""
  48. echo "  The two differ only when rcsfreeze was invoked with an argument."
  49. echo ""
  50. echo "Give a log message, summarizing changes (end with EOF or CTRL-\)*N"
  51.  
  52. echo >T:LOG{$$} "*NVersion: $SYMREVNAME($SYMREV), Date: `DATE`*N"
  53. type >>T:LOG{$$} CONSOLE:
  54.  
  55. type >>$LOGFILE T:LOG{$$}
  56. delete >NIL: T:LOG{$$}
  57. echo "*N"
  58.  
  59. failat 21
  60. list >t:q{$$} #?,v lformat="T:SCR{$$} *"%s*" *"$SYMREVNAME*""
  61. cd $AKTDIR
  62.  
  63. echo >T:SCR{$$}  ".key file,symrevname"
  64. echo >>T:SCR{$$} ".bra ["
  65. echo >>T:SCR{$$} ".ket ]"
  66. echo >>T:SCR{$$} "rlog >T:LOG{$$} -h [file]"
  67. echo >>T:SCR{$$} "echo >PIPE:SED{$$} first 9 *"*`search nonum search branch: T:LOG{$$}*`*""
  68. echo >>T:SCR{$$} "Set REV *`type PIPE:SED{$$}*`"
  69. echo >>T:SCR{$$} "if *"*$REV*" eq *":*""
  70. echo >>T:SCR{$$} "    echo >PIPE:SED{$$} first 7 *"*`search nonum search head: T:LOG{$$}*`*""
  71. echo >>T:SCR{$$} "    Set REV *`type PIPE:SED{$$}*`"
  72. echo >>T:SCR{$$} "endif"
  73. echo >>T:SCR{$$} "delete >NIL: T:LOG{$$}"
  74. echo >>T:SCR{$$} "if not *"*$REV*" eq *":*""
  75. echo >>T:SCR{$$} "echo *"rcsfreeze: '*$REV' [file]*""
  76. echo >>T:SCR{$$} "rcs -q *"-n[symrevname]:*$REV*" [file]"
  77. echo >>T:SCR{$$} "endif"
  78. PROTECT T:SCR{$$} +s
  79.  
  80. IF exists t:q{$$}
  81. execute t:q{$$}
  82. ELSE
  83. echo "No RCS files found"
  84. ENDIF
  85. delete >NIL: t:q{$$}
  86. delete >NIL: T:SCR{$$}
  87.  
  88. unset AKTDIR
  89. unset LOGFILE
  90. unset RCSDIR
  91. unset VERSIONFILE
  92.