Subject: YASS
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Michael L. VanLoon -- Iowa State University <michaelv@iastate.edu>
List: current-users
Date: 12/09/1993 16:45:06
Yet Another Sup Script...  The two sup updating scripts I've seen so
far really didn't meet my needs, so I wrote my own.  All this script
does is scan through your sup logfile (from a sup -v) and touch all
the files you received in that sup session.  Simple, eh?  This assures
that the newly received files will have newer timestamps than their
respective .o files.  This lets you just go do a make right after
supping as long as there aren't other factors involved in a certain
dir that require a make clean;make depend (usually not necessary).

Here's the script for your current-building pleasure:

  ----- >8 ----- start of script ----- 8< -----
#!/bin/csh

# By Michael VanLoon <michaelv@iastate.edu>
#
# This script simply touches all the files that have just been received
# via "sup -v" so they're assured to be newer than their .o files on the
# next make.  This makes a "make clean ; make depend" unnecessary in
# *most* cases (there are other factors that at times might make a 
# "make clean ; make depend" a necessity in certain circumstances).
#
# Use at your own risk.  No warranty implied.  Mileage may vary.
#   Usage: suptouch suplogname

if ( $#argv == 0 ) then
    echo "USAGE: suptouch filename [filename ...]"
    exit(1)
endif

set BASE="/usr"

foreach infile ( $argv )
    echo "Input File: $infile"
    foreach newfile ( `awk '/Receiving file/ {print $4}' $infile` )
        echo "  touching $BASE/$newfile"
        touch $BASE/$newfile
    end
end
  ----- >8 -----  end of script  ----- 8< -----

				--Michael

------------------------------------------------------------------------------
    Michael L. VanLoon  --  michaelv@iastate.edu  --  gg.mlv@isumvs.bitnet
 Iowa State University of Science and Technology -- The way cool place to be!
   Project Vincent Systems Staff, Iowa State University Computation Center
------------------------------------------------------------------------------



------------------------------------------------------------------------------