Project

General

Profile

1
#!/bin/sh
2
# Gets the date of an import based on its log files' mtimes
3
# Note that this is the time the first special input *finished* importing.
4
# The import itself generally starts a few minutes before that, and the exact
5
# time is in that import's public schema comment.
6
# Note that Mac and Linux differ in the order they sort the logs in.
7

    
8
selfDir="$(dirname -- "$0")"
9

    
10
if ! test "$#" -ge 1; then
11
    echo "Usage: self logs..."|fold -s >&2
12
    exit 2
13
fi
14

    
15
for log in "$@"; do
16
    "$selfDir/mtime" "$log"
17
    break # only for first log file
18
done
(28-28/79)