Skip to content

Commit

Permalink
maven-helper: need to special-case get_mtime also on Windows
Browse files Browse the repository at this point in the history
Chances are that developers try to use the shell scripts with the Git
Bash, but the Git for Windows installer does not install the stat(1)
utility. So fall back to using GNU date(1)'s -r option.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Jul 8, 2013
1 parent 291210c commit 2ae35fe
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bin/maven-helper.sh
Expand Up @@ -18,12 +18,18 @@ die () {
get_mtime () {
stat -c %Y "$1"
}
if test Darwin = "$(uname -s 2> /dev/null)"
then
case "$(uname -s 2> /dev/null)" in
MINGW*)
get_mtime () {
date -r "$1" +%s
}
;;
Darwin)
get_mtime () {
stat -f %m "$1"
}
fi
;;
esac

# Parse <groupId>:<artifactId>:<version> triplets (i.e. GAV parameters)

Expand Down

0 comments on commit 2ae35fe

Please sign in to comment.