summaryrefslogtreecommitdiff
path: root/pgm3/pgm3test.d/script
diff options
context:
space:
mode:
author53hornet <53hornet@gmail.com>2019-02-02 22:59:54 -0500
committer53hornet <53hornet@gmail.com>2019-02-02 22:59:54 -0500
commit379c2c17e68d5d471a6a9673b7e9cd1fb9d99bbb (patch)
treeeed499da8211a5eece757639331a2d82bce4fa4c /pgm3/pgm3test.d/script
downloadcsci415-379c2c17e68d5d471a6a9673b7e9cd1fb9d99bbb.tar.xz
csci415-379c2c17e68d5d471a6a9673b7e9cd1fb9d99bbb.zip
Diffstat (limited to 'pgm3/pgm3test.d/script')
-rw-r--r--pgm3/pgm3test.d/script24
1 files changed, 24 insertions, 0 deletions
diff --git a/pgm3/pgm3test.d/script b/pgm3/pgm3test.d/script
new file mode 100644
index 0000000..9bb8248
--- /dev/null
+++ b/pgm3/pgm3test.d/script
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# after doing a
+# cp -a ~kearns/public/415/P3/pgm3test.d .
+# run ./script to set access times
+#
+# ./script should be run before every test to
+# reset access times to well-known values
+
+OLD='2005-01-01'
+NEW='yesterday'
+
+TOUCH=/usr/bin/touch
+
+#give a.out current access time
+$TOUCH --time=access ./a.out
+
+# give fileinfo.c access time of Jan 1, 2005
+$TOUCH --time=access --date=$OLD ./fileinfo.c
+
+# subdir/subsubdir files given staggered access times
+$TOUCH --time=access --date=$OLD ./subdir/subsubdir/file1
+$TOUCH --time=access --date=$NEW ./subdir/subsubdir/file2
+$TOUCH --time=access --date=$NEW ./subdir/subsubdir/file3