projects
/
debian
/
gzip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd3e3d7
)
gzip 1.3.5
author
Jean-loup Gailly
<jloup@chorus.fr>
Thu, 27 May 1993 14:28:42 +0000
(14:28 +0000)
committer
Jean-loup Gailly
<jloup@chorus.fr>
Thu, 27 May 1993 14:28:42 +0000
(14:28 +0000)
sample/ztouch
[new file with mode: 0755]
patch
|
blob
diff --git a/sample/ztouch
b/sample/ztouch
new file mode 100755
(executable)
index 0000000..
e408e2b
--- /dev/null
+++ b/
sample/ztouch
@@ -0,0
+1,15
@@
+#! /usr/local/bin/perl
+# Set the time stamp of a gzip'ed file from that stored in the file.
+# usage: ztouch files...
+
+foreach $file (@ARGV) {
+ open (FILE, $file);
+ read (FILE, $_, 8);
+ ($magic, $method, $flags, $time) = unpack ("A2C2V", $_);
+ if ($magic eq "\037\213") {
+ utime ($time, $time, $file);
+ }
+ else {
+ warn "$file is not compressed with gzip!\n";
+ }
+}