Skip to content

Commit fce3b6f

Browse files
authored
Merge pull request #1235 from tulinkry/messages-date-detect
autodetecting the date binary for messages
2 parents 458469a + c17bbcd commit fce3b6f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tools/Messages

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66
#
77
# Supported Environment Variables for configuring the default setup:
88
# - OPENGROK_DISTRIBUTION_BASE Base Directory of the OpenGrok Distribution
9-
# - containing the opengrok.jar
9+
# - containing the lib/opengrok.jar
1010
# - OPENGROK_JAR OpenGrok java package
11-
# switch), default is DATA_ROOT/etc/ctags.config
11+
# - DATE GNU date binary (supporting --date switch)
1212
# - JAVA_HOME Full Path to Java Installation Root
1313
# - JAVA Full Path to java binary (to enable 64bit JDK)
1414
# - JAVA_OPTS Java options (e.g. for JVM memory increase view
1515

1616
PROGNAME=`basename $0`
17-
DATE="${DATE:-date}"
17+
if date --date="+5 min" +"%s" >/dev/null 2>&1
18+
then
19+
DATE="${DATE:-date}"
20+
else
21+
DATE="${DATE:-gdate}"
22+
fi
1823

1924
SCRIPT_DIRECTORY=`dirname "${0}"`
2025
SCRIPT_DIRECTORY=`cd "${SCRIPT_DIRECTORY}"; pwd`

0 commit comments

Comments
 (0)