home *** CD-ROM | disk | FTP | other *** search
- .key arg
- .bra {
- .ket }
- ;
- ; This is an AmigaOS replacement for the rcsfreeze script.
- ; It works if you don't mess too much with local shell variables.
- ;
- ; $Id: rcsfreeze,v 1.5 1993/01/18 20:09:47 heinz Exp $
- ;
-
- if exists RCS_link
- set RCSDIR `type RCS_link`
- else
- if exists RCS
- set RCSDIR RCS
- else
- set RCSDIR ""
- endif
- endif
-
- set AKTDIR `cd`
-
- cd >NIL: $RCSDIR
-
- Set VERSIONFILE .rcsfreeze.ver
- Set LOGFILE .rcsfreeze.log
-
- if not exists $VERSIONFILE
- echo >$VERSIONFILE "0"
- echo >$LOGFILE ""
- endif
-
- set VERSIONNUMBER `type $VERSIONFILE`
- set VERSIONNUMBER `eval $VERSIONNUMBER + 1`
- echo >$VERSIONFILE $VERSIONNUMBER
-
- Set SYMREV C_$VERSIONNUMBER
-
- if "{arg}" gt ""
- Set SYMREVNAME "{arg}"
- else
- Set SYMREVNAME $SYMREV
- endif
-
- echo "rcsfreeze: symbolic revision number computed: '$SYMREV'"
- echo " symbolic revision number used: '$SYMREVNAME'"
- echo ""
- echo " The two differ only when rcsfreeze was invoked with an argument."
- echo ""
- echo "Give a log message, summarizing changes (end with EOF or CTRL-\)*N"
-
- echo >T:LOG{$$} "*NVersion: $SYMREVNAME($SYMREV), Date: `DATE`*N"
- type >>T:LOG{$$} CONSOLE:
-
- type >>$LOGFILE T:LOG{$$}
- delete >NIL: T:LOG{$$}
- echo "*N"
-
- failat 21
- list >t:q{$$} #?,v lformat="T:SCR{$$} *"%s*" *"$SYMREVNAME*""
- cd $AKTDIR
-
- echo >T:SCR{$$} ".key file,symrevname"
- echo >>T:SCR{$$} ".bra ["
- echo >>T:SCR{$$} ".ket ]"
- echo >>T:SCR{$$} "rlog >T:LOG{$$} -h [file]"
- echo >>T:SCR{$$} "echo >PIPE:SED{$$} first 9 *"*`search nonum search branch: T:LOG{$$}*`*""
- echo >>T:SCR{$$} "Set REV *`type PIPE:SED{$$}*`"
- echo >>T:SCR{$$} "if *"*$REV*" eq *":*""
- echo >>T:SCR{$$} " echo >PIPE:SED{$$} first 7 *"*`search nonum search head: T:LOG{$$}*`*""
- echo >>T:SCR{$$} " Set REV *`type PIPE:SED{$$}*`"
- echo >>T:SCR{$$} "endif"
- echo >>T:SCR{$$} "delete >NIL: T:LOG{$$}"
- echo >>T:SCR{$$} "if not *"*$REV*" eq *":*""
- echo >>T:SCR{$$} "echo *"rcsfreeze: '*$REV' [file]*""
- echo >>T:SCR{$$} "rcs -q *"-n[symrevname]:*$REV*" [file]"
- echo >>T:SCR{$$} "endif"
- PROTECT T:SCR{$$} +s
-
- IF exists t:q{$$}
- execute t:q{$$}
- ELSE
- echo "No RCS files found"
- ENDIF
- delete >NIL: t:q{$$}
- delete >NIL: T:SCR{$$}
-
- unset AKTDIR
- unset LOGFILE
- unset RCSDIR
- unset VERSIONFILE
-