3 # This shell script runs findnewrcs on a clone tree.
9 Usage: fnrclone [-OPTIONS] <source> <destination>
11 [-c (checkout any new versions of files from RCS)]
12 [-s (create a script & log file in $HOME/fnrclone and
14 [-n (leave actual files, not symbolic links)]
15 [-f <logfile name> (create a log file of changes)]
16 [-d (descend symbolically linked directories)]
17 [-S (do not follow symbolic links for files)
18 [-O (do not check out files, Only create symbolic links for existing files)
19 [-C (process SCCS directories[usually they are ignored])
21 NOTE: the default is make symbolic links and don't check out newer
22 revisions of files, just shadow the source. If the RCS directory is
23 accessible, check out any brand new files as real files. If the
24 RCS directory is not accessible (remote exchange), do NOT check out
30 if [ $# -lt 2 ] ; then
40 set -- `getopt csSCOdnuf: $*`
52 -d) ACTUAL="${ACTUAL}f";shift;;
55 *) SRC=$1;DEST=$2;shift 2;;
59 OPTS="${DEF_X}${DEF_s}${DEF_S}${DEF_C}${DEF_O}${ACTUAL}${LINKOPT}miA"
62 # get the system from uname -s
68 Findnewrcs="findnewrcs.${SYSTEM}"
69 if [ "$SYSTEM" = "HP-UX" ];then
71 M700=`echo $MACHINE | fgrep '/7' 2>/dev/null`
72 M800=`echo $MACHINE | fgrep '/8' 2>/dev/null`
73 R100=`echo $RELEASE | fgrep '10.' 2>/dev/null`
74 R90=`echo $RELEASE | fgrep '9.' 2>/dev/null`
75 R80=`echo $RELEASE | fgrep '8.' 2>/dev/null`
76 R70=`echo $RELEASE | fgrep '7.' 2>/dev/null`
79 Findnewrcs="findnewrcs.700.100"
81 Findnewrcs="findnewrcs.700.807"
83 elif [ "$M800" ]; then
85 Findnewrcs="findnewrcs.800.100"
87 Findnewrcs="findnewrcs.800.90"
89 Findnewrcs="findnewrcs.800.80"
91 Findnewrcs="findnewrcs.800.70"
95 Findnewrcs="findnewrcs.300.90"
97 Findnewrcs="findnewrcs.300.80"
102 if [ "$SYSTEM" = "SunOS" ];then
104 if [ "$MACHINE" = "i86pc" ];then
105 Findnewrcs="findnewrcs.UNIX_SV"
106 elif [ "$MACHINE" = "prep" ];then
107 Findnewrcs="findnewrcs.SunOS_PPC"
109 Findnewrcs="findnewrcs.SunOS"
115 # make an old style script
117 FNR_BINDIR=`dirname $0`
118 if [ ! "$DEF_X" ];then
120 FNR_DIR=/$HOME/fnrclone
121 [ ! -d $FNR_DIR ] && mkdir $FNR_DIR
122 FNR_SCRIPT=$FNR_DIR/script$DATE
123 FNR_LOG=$FNR_DIR/log$DATE
124 $FNR_BINDIR/$Findnewrcs -S${SRC} -W${DEST} -${OPTS} > $FNR_SCRIPT 2> $FNR_LOG
125 chmod 777 $FNR_SCRIPT
128 echo "`basename $0`: script is in $FNR_SCRIPT, logfile is $FNR_LOG"
131 echo "logfile is also in $LOG"
133 else # execute without a script
135 $FNR_BINDIR/$Findnewrcs -S${SRC} -W${DEST} -${OPTS} 2> $LOG
137 $FNR_BINDIR/$Findnewrcs -S${SRC} -W${DEST} -${OPTS}