#!/bin/sh
#
# 'untouch' shell script created 
# on Fri Sep  7 02:17:39 MDT 2012
#
# ENVIRONMENT:
#   TZ=US/Mountain; export TZ
#
# COMMANDS:
#   cd /home/markb/src/els/release/1.51b2/els-1.51b2
#   els +v=1.51 +UR
#
# NB: Just because you are able to 'touch' a file doesn't necessarily mean
# that you can 'untouch' it.  The ability to untouch a file may require
# that you be the direct owner of the file or have super-user privileges.
#
# Save the following output into a script file so that it can then be run
# at a later time in order to recover file dates following a 'touch':
#

untouch()
{
   CKSUM=$1; SIZE=$2; DATE=$3; FILE="$4"
   [ -f "$FILE" ] && \
     [ `els +G%m +TI "$FILE"` != $DATE ] && \
       [ `els +G%s "$FILE"` = $SIZE ] && \
	 [ `els +C=posix +G%C "$FILE"` = $CKSUM ] && \
	   chdate -m $DATE "$FILE"
}

TZ=US/Mountain; export TZ

#          Checksum Size           Date       File
#        ---------- ----     ---------------  ----
untouch  2670804262 35459    20120907.021045  CHANGE_LOG
untouch  2362941735 1448     20120719.202431  INSTALL
untouch  4184578927 7313     20120719.202414  Makefile
untouch   838643347 5719     20090107.220647  NEWS
untouch  2644980290 251      20061101.004133  README
untouch  3681909039 5093     20100706.225508  TECH_NOTES
untouch  1221477615 50305    20120907.001910  USER_GUIDE
untouch  2906224900 23649    20120510.003829  auxil.c
untouch   973742472 2568     20110829.201604  auxil.h
untouch  2792848207 7789     20120830.001857  chdate.1
untouch   471816875 20599    20120830.002210  chdate.c
untouch  3245377055 14731    20120811.000938  cksum.c
untouch  1566599832 1795     20120811.001158  cksum.h
untouch  3047017686 13455    20110520.195559  config.c
untouch   454041961 9374     20120906.230356  defs.h
untouch  3495338651 9868     20120830.001905  edate.1
untouch   793140945 37586    20120830.002158  edate.c
untouch  3637397268 25790    20120907.001939  els.1
untouch  1158541289 158873   20120907.001845  els.c
untouch  4283650919 9018     20120907.001717  els.h
untouch  1778047654 47955    20120321.180407  elsFilter.c
untouch  1893935695 2956     20110919.190310  elsFilter.h
untouch   265060380 14716    20120321.001427  elsMisc.c
untouch  2199257699 1524     20050908.222815  elsMisc.h
untouch  1038989166 2083     20080609.233436  format.c
untouch  2434561743 5032     20110519.184617  format.h
untouch  4179783902 29535    20120822.194033  getdate32.c
untouch  2315992810 1455     20001018.200051  getdate32.h
untouch  2719621272 2835     20030130.164600  phLib.c
untouch  1178666143 1396     20020513.212333  phLib.h
untouch   903084701 9549     20110829.222235  quotal.c
untouch  3589372498 1208     20020507.163033  quotal.h
untouch  2364341881 3495     20120906.230902  sysInfo.c
untouch   828593629 1130     20041027.181357  sysInfo.h
untouch   504599531 9145     20120907.021300  sysdefs.h
untouch  2238407687 5680     20080811.221049  sysdep.c
untouch  3468710274 1262     20080811.221112  sysdep.h
untouch  1097362515 11888    19991123.000645  time32.c
untouch  2302841894 1985     19970827.141331  time32.h
untouch  1686076897 981      20120907.021739  untouch
untouch  3676771890 232      20120906.222046  version.h
# EOF.
