summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/shman.sh35
1 files changed, 1 insertions, 34 deletions
diff --git a/tools/shman.sh b/tools/shman.sh
index f9c993e..6d5c5db 100755
--- a/tools/shman.sh
+++ b/tools/shman.sh
@@ -33,39 +33,6 @@ warn()
printf "shman: Warning: ${fmt}\n" "${@}" >&2
}
-get_mtime()
-{
- local file="${1}"
- shift 1
- local m=
- local d=
- local y=
- local now_m=
- local now_y=
-
- read m d y <<-EOF
- $(LC_ALL=POSIX ls -l "${file}" | cut -d ' ' -f 6-8)
- EOF
- case "${m}" in
- 'Jan') m=1;; 'Feb') m=2;; 'Mar') m=3;; 'Apr') m=4;;
- 'May') m=5;; 'Jun') m=6;; 'Jul') m=7;; 'Aug') m=8;;
- 'Sep') m=9;; 'Oct') m=10;; 'Nov') m=11;; 'Dec') m=12;;
- esac
- case "${y}" in *':'*)
- read now_m now_y <<-EOF
- $(date '+%m %Y')
- EOF
- now_m="${now_m#0}"
- if [ ${now_m} -ge ${m} ]; then
- y=${now_y}
- else
- y=$((${now_y} - 1))
- fi
- esac
-
- printf '%d-%02d-%02d' ${y} ${m} ${d}
-}
-
gen_doc_func()
{
local sym="${1}"
@@ -229,7 +196,7 @@ parse_docs()
local got_doc=false
local is_func=false
- date="$(get_mtime "${file}")"
+ date="$("$(dirname "${0}")/mtime.sh" "${file}")"
while IFS='' read -r line; do
case "${line}" in