#!/bin/tcsh -f # This script installs any newly modified shell scripts into the tech dir. set me=$0:t # the name of this program # Abort if the required env variables aren't set if (! ${?HTML_DIR}) then echo ${me}: HTML_DIR environment variable not set\! exit endif if ($# == 1) then if ("$1" == "all") then set doAll else echo "Unknown option: $1" exit endif endif set theType = "scripts" set srcDir=~/bin set destDir=$HTML_DIR/tech/scripts set theFiles=(\ _newbulkroot \ backup-htaccess \ buildsite \ bulkfix \ bulklist \ css-progress \ makebulk \ insert_chunk \ stamp \ stamp_bulk \ stamp_rev-date \ sync-scripts \ typosniff \ typosniff.patterns \ upload_to_server\ ) # with the optional "all" argument, copies *all* the files if ($?doAll) then foreach x ($theFiles) cp $srcDir/$x $destDir/. end echo "Files copied." endif echo "Sync'ing $theType files:" foreach x ($theFiles) if (-M $srcDir/$x > -M $destDir/$x) then # compare last modified dates echo " Updating $destDir/$x" cp $srcDir/$x $destDir/. endif end # jtb 010204 -- copy the BULKMAKE file set x="BULKMAKE" if (-M $HTML_DIR/$x > -M $destDir/$x) then # compare last modified dates echo " Updating $destDir/$x" cp $HTML_DIR/$x $destDir/. endif echo "$theType files ($destDir) are up to date."