mirror of
https://https.git.savannah.gnu.org/git/gzip.git
synced 2026-01-27 18:04:39 +00:00
This avoids a new syntax-check failure. * ChangeLog-2007: Perform that change. * NEWS: Likewise. * algorithm.doc: Likewise. * doc/gzip.texi: Likewise. * gunzip.in: Likewise. * gzip.1: Likewise. * gzip.c: Likewise. * gzip.h: Likewise. * m4/.gitignore: Likewise. * sample/ztouch: Likewise. * tests/timestamp: Likewise. * unzip.c: Likewise. * zip.c: Likewise. * znew.1: Likewise. * cfg.mk: Update the old news hash accordingly.
16 lines
397 B
Perl
Executable File
16 lines
397 B
Perl
Executable File
#! /usr/local/bin/perl
|
|
# Set the timestamp 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";
|
|
}
|
|
}
|