#!/bin/sh
#
# 'untouch' shell script created 
# on Mon Oct 28 21:11:01 MDT 2013
#
# ENVIRONMENT:
#   TZ=US/Mountain; export TZ
#
# COMMANDS:
#   cd /home/markb/src/els/release/1.51d2/els-1.51d2
#   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  3446122174 37052    20131028.211013  CHANGE_LOG
untouch  2362941735 1448     20120719.202431  INSTALL
untouch  3249183794 7506     20131021.233321  Makefile
untouch   838643347 5719     20090107.220647  NEWS
untouch  2644980290 251      20061101.004133  README
untouch  3681909039 5093     20100706.225508  TECH_NOTES
untouch  3498229292 50331    20121127.195224  USER_GUIDE
untouch  2906224900 23649    20120510.003829  auxil.c
untouch   973742472 2568     20110829.201604  auxil.h
untouch  3067325457 8560     20121128.201032  chdate.1
untouch  3856365237 21844    20121128.200919  chdate.c
untouch  3245377055 14731    20120811.000938  cksum.c
untouch  1566599832 1795     20120811.001158  cksum.h
untouch  3047017686 13455    20110520.195559  config.c
untouch  1366839415 9356     20130709.014117  defs.h
untouch  1813251734 10630    20121128.200958  edate.1
untouch  2336414916 38561    20130523.204632  edate.c
untouch  1612751127 25822    20121127.200237  els.1
untouch  1582613410 159706   20130819.220620  els.c
untouch  4113190299 9064     20121105.201235  els.h
untouch  1778047654 47955    20120321.180407  elsFilter.c
untouch  1893935695 2956     20110919.190310  elsFilter.h
untouch  1054425033 15148    20121127.205830  elsMisc.c
untouch  2199257699 1524     20050908.222815  elsMisc.h
untouch  1038989166 2083     20080609.233436  format.c
untouch  2434561743 5032     20110519.184617  format.h
untouch  2078029337 33172    20121126.210149  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  1585702181 981      20131028.211101  untouch
untouch  3126772285 230      20131009.231214  version.h
# EOF.
