diff options
| author | Richard M. Stallman | 1993-05-29 06:22:48 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-29 06:22:48 +0000 |
| commit | 148d61aa7f985e91ed8d64326f3f1db4eced5b64 (patch) | |
| tree | 49cb06c26f1832f40cd58be759d341ec3613710c | |
| parent | 5b335fca24740a8b0a185e5e85cf582825e2b817 (diff) | |
| download | emacs-148d61aa7f985e91ed8d64326f3f1db4eced5b64.tar.gz emacs-148d61aa7f985e91ed8d64326f3f1db4eced5b64.zip | |
When given no file arguments, inspect RCS/.* as well
as RCS/*. Don't report an error if RCS is empty or nonexistent.
| -rwxr-xr-x | lib-src/rcs2log | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 65c7a5c6d37..19e16abe97b 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | # Author: Paul Eggert <eggert@twinsun.com> | 13 | # Author: Paul Eggert <eggert@twinsun.com> |
| 14 | 14 | ||
| 15 | # $Id: rcs2log,v 1.10 1993/03/16 22:49:00 eggert Exp eggert $ | 15 | # $Id: rcs2log,v 1.11 1993/05/03 17:55:22 eggert Exp rms $ |
| 16 | 16 | ||
| 17 | # Copyright 1992, 1993 Free Software Foundation, Inc. | 17 | # Copyright 1992, 1993 Free Software Foundation, Inc. |
| 18 | 18 | ||
| @@ -30,6 +30,8 @@ | |||
| 30 | # along with this program; see the file COPYING. If not, write to | 30 | # along with this program; see the file COPYING. If not, write to |
| 31 | # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 31 | # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 32 | 32 | ||
| 33 | nl=' | ||
| 34 | ' | ||
| 33 | 35 | ||
| 34 | # Parse options. | 36 | # Parse options. |
| 35 | 37 | ||
| @@ -114,14 +116,31 @@ then | |||
| 114 | fi | 116 | fi |
| 115 | datearg="-d>$date" | 117 | datearg="-d>$date" |
| 116 | 118 | ||
| 119 | # With no arguments, examine all files under the RCS directory. | ||
| 120 | case $# in | ||
| 121 | 0) | ||
| 122 | files= | ||
| 123 | for file in RCS/.* RCS/* | ||
| 124 | do | ||
| 125 | case $file in | ||
| 126 | RCS/. | RCS/..) ;; | ||
| 127 | RCS/.\* | RCS/\*) test -f "$file" && files=$files$nl$file;; | ||
| 128 | *) files=$files$nl$file | ||
| 129 | esac | ||
| 130 | done | ||
| 131 | case $files in | ||
| 132 | '') exit 0 | ||
| 133 | esac | ||
| 134 | oldIFS=$IFS | ||
| 135 | IFS=$nl | ||
| 136 | set $files | ||
| 137 | IFS=$oldIFS | ||
| 138 | esac | ||
| 139 | |||
| 117 | rlogout=/tmp/chg$$ | 140 | rlogout=/tmp/chg$$ |
| 118 | trap exit 1 2 13 15 | 141 | trap exit 1 2 13 15 |
| 119 | trap 'rm -f $rlogout; exit 1' 0 | 142 | trap 'rm -f $rlogout; exit 1' 0 |
| 120 | 143 | ||
| 121 | case $# in | ||
| 122 | 0) set RCS/* | ||
| 123 | esac | ||
| 124 | |||
| 125 | rlog "$datearg" "$@" >$rlogout || exit | 144 | rlog "$datearg" "$@" >$rlogout || exit |
| 126 | 145 | ||
| 127 | 146 | ||