#!/bin/sh
#
# 'untouch' shell script created 
# on Tue Sep  6 02:54:37 MDT 2022
#
# ENVIRONMENT:
#   setenv TZ US/Mountain
#
# COMMANDS:
#   cd /home/markb/src/els/release/1.55d1/els-1.55d1
#   els +v=1.55 +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  2404805076 43716    20220906.025300  CHANGE_LOG
untouch  2362941735 1448     20120719.202431  INSTALL
untouch   660435795 8506     20210218.033622  Makefile
untouch   838643347 5719     20090107.220647  NEWS
untouch  2644980290 251      20061101.004133  README
untouch  2299047475 6677     20210218.031001  TECH_NOTES
untouch  3940063819 51767    20210218.041322  USER_GUIDE
untouch  4178253386 26870    20210218.034333  auxil.c
untouch  2717514349 2641     20220904.015029  auxil.h
untouch  4252090565 8711     20180913.200350  chdate.1
untouch  3980635741 22348    20180913.200204  chdate.c
untouch   251505441 16357    20160502.221832  cksum.c
untouch   387342252 1549     20160429.012051  cksum.h
untouch  1940666228 16654    20220906.014008  config.c
untouch   753618840 10704    20180905.024039  defs.h
untouch   234897840 11372    20151013.233330  edate.1
untouch  3943811400 39765    20180911.221638  edate.c
untouch   135948617 25904    20151013.234458  els.1
untouch  2319153684 166266   20220904.012301  els.c
untouch  2818463409 6400     20220904.015217  els.h
untouch  1346239087 49811    20220904.032319  elsFilter.c
untouch  1256696665 2968     20160429.012141  elsFilter.h
untouch  1037447381 16541    20160309.190242  elsMisc.c
untouch   686762188 1689     20160308.005642  elsMisc.h
untouch  2049399872 4416     20220904.032125  elsVars.h
untouch   601172562 2187     20150910.191523  format.c
untouch   976368190 6768     20150910.192755  format.h
untouch  3675559034 40480    20180914.003408  getdate32.c
untouch  3314332418 1648     20180910.190018  getdate32.h
untouch   326678010 4496     20220904.035714  lastMAC.c
untouch   947833513 1125     20220904.012334  lastMAC.h
untouch  2719621272 2835     20030130.164600  phLib.c
untouch   203566356 1494     20150903.001801  phLib.h
untouch   564298540 10479    20160928.215839  quotal.c
untouch  2324232619 1145     20121105.192924  quotal.h
untouch  4074067213 4047     20220905.033848  sysInfo.c
untouch   828593629 1130     20041027.181357  sysInfo.h
untouch  2413777042 10290    20220905.032602  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  3467351296 976      20220906.025437  untouch
untouch  2171890295 278      20220906.020651  version.h
# EOF.
