Annotation of coherent/a/bin/diff3, revision 1.1.1.1

1.1       root        1: : /bin/diff3 4/3/91
                      2: : Usage: diff3 [ -ex3 ] file1 file2 file3
                      3: : Run two diffs, then merge their results.
                      4: 
                      5: FLAGS=
                      6: PID=$$
                      7: TMP=/tmp/d3${PID}
                      8: TMPA=${TMP}a
                      9: TMPB=${TMP}b
                     10: 
                     11: case "$1" in
                     12: -* )
                     13:        FLAGS=$1
                     14:        shift
                     15: esac
                     16: 
                     17: case $# in
                     18: 3)
                     19:        ;;
                     20: *)
                     21:        echo 'Usage: diff3 [-ex3] file1 file2 file3'
                     22:        exit 2
                     23: esac
                     24: 
                     25: trap "rm $TMPA $TMPB; exit 2" 1 2 3 5
                     26: 
                     27: diff -d $1 $3 >$TMPA
                     28: 
                     29: case $? in
                     30: [01])
                     31:        diff -d $2 $3 >$TMPB
                     32:        ;;
                     33: *)
                     34:        rm $TMPA
                     35:        exit 2
                     36: esac
                     37: 
                     38: case $? in
                     39: [01])
                     40:        /usr/lib/diff3 $FLAGS $TMP
                     41: esac
                     42: 
                     43: STATUS=$?
                     44: rm $TMPA $TMPB
                     45: exit $STATUS
                     46: 
                     47: : end of /bin/diff3

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.