Annotation of 42BSD/ucb/pascal/pdx/sccs, revision 1.1.1.1

1.1       root        1: #! /bin/csh -f
                      2: #
                      3: # Simple version of the "sccs" command that understands
                      4: # subdirectories better.
                      5: #
                      6: 
                      7: set dir = SCCS
                      8: set command = $1
                      9: shift
                     10: set flags = ()
                     11: set files = ()
                     12: foreach i ($*)
                     13:     if ($i == "-*") then
                     14:        set flags = ($flags $i)
                     15:     else
                     16:        set files = ($files $i)
                     17:     endif
                     18: end
                     19: 
                     20: if ($command == info) then
                     21:     foreach i (SCCS/{p.*,*/p.*})
                     22:        echo $i:t `cat $i`
                     23:     end
                     24:     exit 0
                     25: endif
                     26: 
                     27: foreach i ($files)
                     28:     if ($i:h == $i:t) then
                     29:        set sfile = $dir/s.$i
                     30:     else
                     31:        set sfile = $dir/$i:h/s.$i:t
                     32:     endif
                     33:     switch ($command)
                     34:        case get:
                     35:            get $flags $sfile
                     36:            if ($i:h != $i:t) then
                     37:                mv -f $i:t $i
                     38:            endif
                     39:            breaksw
                     40: 
                     41:        case edit:
                     42:            get -e $flags $sfile
                     43:            if ($i:h != $i:t) then
                     44:                mv -f $i:t $i
                     45:            endif
                     46:            breaksw
                     47: 
                     48:        case delta:
                     49:            if ($i:h != $i:t) then
                     50:                mv -f $i $i:t
                     51:            endif
                     52:            delta $flags $sfile
                     53:            breaksw
                     54: 
                     55:        case delget:
                     56:            ./sccs delta $i
                     57:            ./sccs get $i
                     58:            breaksw
                     59: 
                     60:        case deledit:
                     61:            ./sccs delta $i
                     62:            ./sccs edit $i
                     63:            breaksw
                     64: 
                     65:        case prt:
                     66:            prt $sfile
                     67:            breaksw
                     68: 
                     69:        default:
                     70:            echo $command\: unknown command
                     71:            exit 1
                     72:     endsw
                     73: end

unix.superglobalmegacorp.com

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