1N/A# Get modification time of a file or directory and pretty-print it. 1N/A# Copyright (C) 1995, 1996, 1997, 2003, 2004 Free Software Foundation, Inc. 1N/A# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 1N/A# This program is free software; you can redistribute it and/or modify 1N/A# it under the terms of the GNU General Public License as published by 1N/A# the Free Software Foundation; either version 2, or (at your option) 1N/A# This program is distributed in the hope that it will be useful, 1N/A# but WITHOUT ANY WARRANTY; without even the implied warranty of 1N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1N/A# GNU General Public License for more details. 1N/A# You should have received a copy of the GNU General Public License 1N/A# along with this program; if not, write to the Free Software Foundation, 1N/A# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1N/A# As a special exception to the GNU General Public License, if you 1N/A# distribute this file as part of a program that contains a 1N/A# configuration script generated by Autoconf, you may include it under 1N/A# the same distribution terms that you use for the rest of that program. 1N/A# This file is maintained in Automake, please report 1N/A# bugs to <bug-automake@gnu.org> or send patches to 1N/A# <automake-patches@gnu.org>. 1N/A echo "$0: No file. Try \`$0 --help' for more information." 1>&
2 1N/A# Prevent date giving response in another language. 1N/A# Find out how to get the extended ls output of a file or directory. 1N/A# A `ls -l' line looks as follows on OS/2. 1N/A# drwxrwx--- 0 Aug 11 2001 foo 1N/A# This differs from Unix, which adds ownership information. 1N/A# drwxrwx--- 2 root root 4096 Aug 11 2001 foo 1N/A# To find the date, we split the line on spaces and iterate on words 1N/A# until we find a month. This cannot work with files whose owner is a 1N/A# user named `Jan', or `Feb', etc. However, it's unlikely that `/' 1N/A# will be owned by a user whose name is a month. So we first look at 1N/A# the extended ls output of the root directory to decide how many 1N/A# words should be skipped to get the date. 1N/A# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. 1N/A# Find which argument is the month. 1N/A # Add another shift to the command. 1N/A# Get the extended ls output of the file or directory. 1N/A# Remove all preceding arguments 1N/A# Get the month. Next argument is day, followed by the year or time. 1N/A# Here we have to deal with the problem that the ls output gives either 1N/A# the time of day or the year. 1N/A # For the first six month of the year the time notation can also 1N/A # be used for files modified in the last year. 1N/A# eval: (add-hook 'write-file-hooks 'time-stamp) 1N/A# time-stamp-start: "scriptversion=" 1N/A# time-stamp-format: "%:y-%02m-%02d.%02H" 1N/A# time-stamp-end: "$"