gzip: fix problem with s390 buffer flushes
[gzip.git] / sample / ztouch
blob297f62112546bc86c5b8ab70c0e3ecff000907b0
1 #! /usr/local/bin/perl
2 # Set the timestamp of a gzip'ed file from that stored in the file.
3 # usage: ztouch files...
5 foreach $file (@ARGV) {
6 open (FILE, $file);
7 read (FILE, $_, 8);
8 ($magic, $method, $flags, $time) = unpack ("A2C2V", $_);
9 if ($magic eq "\037\213") {
10 utime ($time, $time, $file);
12 else {
13 warn "$file is not compressed with gzip!\n";