#!/bin/sh
#
# 'untouch' shell script created 
# on Thu Sep 10 19:45:46 MDT 2015
#
# ENVIRONMENT:
#   setenv TZ US/Mountain
#
# COMMANDS:
#   cd /home/markb/src/els/release/1.52a3/els-1.52a3
#   els +v=1.52 +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  3189805124 38950    20150910.194330  CHANGE_LOG
untouch  2362941735 1448     20120719.202431  INSTALL
untouch  1829888396 7591     20131202.190554  Makefile
untouch   838643347 5719     20090107.220647  NEWS
untouch  2644980290 251      20061101.004133  README
untouch  3895474899 6677     20150902.190845  TECH_NOTES
untouch  2208099879 50994    20150903.040717  USER_GUIDE
untouch  2897170488 26631    20150507.212704  auxil.c
untouch  2808915452 2686     20150507.212839  auxil.h
untouch  3067325457 8560     20121128.201032  chdate.1
untouch  3063491569 21944    20150909.223455  chdate.c
untouch  2805813396 15500    20150910.010328  cksum.c
untouch   329116563 1537     20150910.005040  cksum.h
untouch  3754166914 15653    20150910.192906  config.c
untouch  1765299678 9909     20150902.013319  defs.h
untouch  2576694862 11294    20150722.210351  edate.1
untouch  3547008768 39459    20150909.223442  edate.c
untouch  3953941538 25814    20150903.040750  els.1
untouch   239493203 161964   20150910.193117  els.c
untouch  3304350663 9306     20150910.184611  els.h
untouch  3047552868 49446    20150910.183224  elsFilter.c
untouch  1893935695 2956     20110919.190310  elsFilter.h
untouch  1905052622 15944    20150910.183406  elsMisc.c
untouch   394227071 1623     20150908.131821  elsMisc.h
untouch   601172562 2187     20150910.191523  format.c
untouch   976368190 6768     20150910.192755  format.h
untouch   382352465 35532    20150909.213744  getdate32.c
untouch  2315992810 1455     20001018.200051  getdate32.h
untouch  2719621272 2835     20030130.164600  phLib.c
untouch   203566356 1494     20150903.001801  phLib.h
untouch   314043984 9609     20121105.202903  quotal.c
untouch  2324232619 1145     20121105.192924  quotal.h
untouch  1805564099 3642     20150909.222259  sysInfo.c
untouch   828593629 1130     20041027.181357  sysInfo.h
untouch  1988483681 9214     20131127.212253  sysdefs.h
untouch  2238407687 5680     20080811.221049  sysdep.c
untouch  3468710274 1262     20080811.221112  sysdep.h
untouch  1295281883 13447    20150909.212417  time32.c
untouch  1322778907 2032     19970827.141331  time32.h
untouch   919588465 975      20150910.194546  untouch
untouch  1091985953 233      20150910.182153  version.h
# EOF.
