comparison lib-src/rcs-checkin @ 4343:aa19e3673b9f

Don't check whether file is readable until we have decided not to ignore it.
author Paul Eggert <eggert@twinsun.com>
date Thu, 29 Jul 1993 19:56:38 +0000
parents dcbc46826515
children 9e5812a795da
comparison
equal deleted inserted replaced
4342:1088a9aa4fd0 4343:aa19e3673b9f
33 # expr pattern to extract owner from ls -l output 33 # expr pattern to extract owner from ls -l output
34 ls_owner_pattern='[^ ][^ ]* *[^ ][^ ]* *\([^ ][^ ]*\)' 34 ls_owner_pattern='[^ ][^ ]* *[^ ][^ ]* *\([^ ][^ ]*\)'
35 35
36 for file 36 for file
37 do 37 do
38 # Check that file is readable.
39 <$file || exit
40
41 # Make it easier to say `rcs-checkin *' 38 # Make it easier to say `rcs-checkin *'
42 # by ignoring file names that already contain `~', or end in `,v'. 39 # by ignoring file names that already contain `~', or end in `,v'.
43 case $file in 40 case $file in
44 *~* | *,v) continue 41 *~* | *,v) continue
45 esac 42 esac
46 # Ignore non-files too. 43 # Ignore non-files too.
47 test -f "$file" || continue 44 test -f "$file" || continue
45
46 # Check that file is readable.
47 <$file || exit
48 48
49 # If the RCS file does not already exist, 49 # If the RCS file does not already exist,
50 # initialize it with a description from $file's first line. 50 # initialize it with a description from $file's first line.
51 rlog -R "$file" >/dev/null 2>&1 || 51 rlog -R "$file" >/dev/null 2>&1 ||
52 rcs -i -q -t-"`sed 1q $file`" "$file" || exit 52 rcs -i -q -t-"`sed 1q $file`" "$file" || exit