#!/bin/sh
#
# 'untouch' shell script created 
# on Tue Nov 13 23:37:50 MST 2012
#
# ENVIRONMENT:
#   TZ=US/Mountain; export TZ
#
# COMMANDS:
#   cd /home/markb/src/els/release/1.51c2/els-1.51c2
#   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   394820360 36067    20121113.233309  CHANGE_LOG
untouch  2362941735 1448     20120719.202431  INSTALL
untouch  1962109494 7333     20121113.231818  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   823253377 7831     20121109.040519  chdate.1
untouch  3618000622 21063    20121109.040449  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  3860624056 158988   20121105.200250  els.c
untouch  4113190299 9064     20121105.201235  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   314043984 9609     20121105.202903  quotal.c
untouch  2324232619 1145     20121105.192924  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    89618931 981      20121113.233750  untouch
untouch  2770023146 232      20121113.233421  version.h
# EOF.
