#!/bin/sh
#
# 'untouch' shell script created 
# on Fri May 20 20:02:57 MDT 2011
#
# ENVIRONMENT:
#   TZ=US/Mountain; export TZ
#
# COMMANDS:
#   cd /home/markb/src/els/release/1.50d2/els-1.50d2
#   els +v=1.50 +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  2871213961 29624    20110519.200456  CHANGE_LOG
untouch  2976402821 1442     20080623.213929  INSTALL
untouch  1906020563 7295     20101022.180549  Makefile
untouch   838643347 5719     20090107.220647  NEWS
untouch  2644980290 251      20061101.004133  README
untouch  3681909039 5093     20100706.225508  TECH_NOTES
untouch  2944083637 48559    20110510.210022  USER_GUIDE
untouch  3178102734 23120    20101130.200817  auxil.c
untouch   831355069 2619     20101130.200905  auxil.h
untouch  1975219697 7095     20080819.155737  chdate.1
untouch  1863560920 18256    20080826.221238  chdate.c
untouch  3865851092 14427    20080610.004446  cksum.c
untouch  2932259250 1695     20031009.193211  cksum.h
untouch  3047017686 13455    20110520.195559  config.c
untouch  1750196030 8122     20110520.192538  defs.h
untouch  2321399323 9370     20071219.190733  edate.1
untouch  3055878830 35740    20110519.184626  edate.c
untouch   218197416 23307    20110510.210034  els.1
untouch  1428232228 148931   20110520.193940  els.c
untouch  2108473743 8338     20110517.183642  els.h
untouch   348746396 45774    20100316.005416  elsFilter.c
untouch   246485176 2953     20080610.233240  elsFilter.h
untouch  1042459856 14753    20110519.014613  elsMisc.c
untouch  2199257699 1524     20050908.222815  elsMisc.h
untouch  1038989166 2083     20080609.233436  format.c
untouch  2434561743 5032     20110519.184617  format.h
untouch  4106665088 28421    20100310.192142  getdate32.c
untouch  2315992810 1455     20001018.200051  getdate32.h
untouch  2719621272 2835     20030130.164600  phLib.c
untouch  1178666143 1396     20020513.212333  phLib.h
untouch  2039072992 9412     20080609.202352  quotal.c
untouch  3589372498 1208     20020507.163033  quotal.h
untouch  2572592699 3368     20080702.193425  sysInfo.c
untouch   828593629 1130     20041027.181357  sysInfo.h
untouch  3908426530 8553     20081028.170228  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  4065314610 981      20110520.200257  untouch
untouch  2833747296 227      20110520.192858  version.h
# EOF.
