• Home
  • Raw
  • Download

Lines Matching +full:ls +full:- +full:files

2 # Get modification time of a file or directory and pretty-print it.
4 scriptversion=2010-08-21.06; # UTC
6 # Copyright (C) 1995-2012 Free Software Foundation, Inc.
28 # bugs to <bug-automake@gnu.org> or send patches to
29 # <automake-patches@gnu.org>.
31 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
34 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36 alias -g '${1+"$@"}'='"$@"'
42 echo "$0: No file. Try '$0 --help' for more information." 1>&2
45 -h | --h*)
47 Usage: mdate-sh [--help] [--version] FILE
49 Pretty-print the modification day of FILE, in the format:
52 Report bugs to <bug-automake@gnu.org>.
56 -v | --v*)
57 echo "mdate-sh $scriptversion"
77 # GNU ls changes its time format in response to the TIME_STYLE
81 TIME_STYLE=posix-long-iso
87 # Find out how to get the extended ls output of a file or directory.
88 if ls -L /dev/null 1>/dev/null 2>&1; then
89 ls_command='ls -L -l -d'
91 ls_command='ls -l -d'
94 if ls -n /dev/null 1>/dev/null 2>&1; then
95 ls_command="$ls_command -n"
98 # A 'ls -l' line looks as follows on OS/2.
99 # drwxrwx--- 0 Aug 11 2001 foo
101 # drwxrwx--- 2 root root 4096 Aug 11 2001 foo
104 # until we find a month. This cannot work with files whose owner is a
107 # the extended ls output of the root directory to decide how many
110 # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
118 test $# -gt 0 || error "failed parsing '$ls_command /' output"
138 test -n "$month" || error "failed parsing '$ls_command /' output"
140 # Get the extended ls output of the file or directory.
186 # Here we have to deal with the problem that the ls output gives either
205 # be used for files modified in the last year.
208 year=`expr $year - 1`
217 # mode: shell-script
218 # sh-indentation: 2
219 # eval: (add-hook 'write-file-hooks 'time-stamp)
220 # time-stamp-start: "scriptversion="
221 # time-stamp-format: "%:y-%02m-%02d.%02H"
222 # time-stamp-time-zone: "UTC"
223 # time-stamp-end: "; # UTC"