Better support for option cleanup in python package
[adesklets.git] / doc / mdate-sh
blob3ef75a6de9ed996bc468060b9ddc3a438144ae2a
1 #!/bin/sh
2 # Get modification time of a file or directory and pretty-print it.
3 # Copyright 2005, Sylvain Fourmanoit <syfou@users.sourceforge.net>
4 #
5 # Non-portable, multi-language replacement for original mdate-sh
6 # script by Ulrich Drepper <drepper@gnu.ai.mit.edu>.
9 # Set locale according to file suffix
11 LOCALE=`echo "$1" | \
12 sed -n '/\_\([^\.]\+\)\.texi$/{s/[^_]\+_\([^\.]\+\)\.texi/\1_\U\1/;p}'`
13 : ${LOCALE:=en_US}
14 export LC_ALL=${LOCALE}
16 # Get the date in a 'DD MM YY' format
18 find . -name "$(basename $1)" -printf "%Ad %AB %AY\n"