summaryrefslogtreecommitdiff
path: root/src/third_party/scripts/timelib_get_sources.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/scripts/timelib_get_sources.sh')
-rwxr-xr-xsrc/third_party/scripts/timelib_get_sources.sh29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/third_party/scripts/timelib_get_sources.sh b/src/third_party/scripts/timelib_get_sources.sh
index 190658783e9..f30acfad1fb 100755
--- a/src/third_party/scripts/timelib_get_sources.sh
+++ b/src/third_party/scripts/timelib_get_sources.sh
@@ -7,12 +7,9 @@ set -o errexit
# timelib does not use any autotools/cmake/config system to it is a simple import.
# This script is designed to run on Linux or Mac OS X
-# Parsers make use of re2c, which needs to be installed and be version 0.15.3
-# *only*. re2c 0.16 introduces an issues with clang which causes any date
-# parser to hang.
#
-VERSION=2021.06
+VERSION=2022.04
NAME=timelib
TARBALL=$VERSION.tar.gz
TARBALL_DIR=$NAME-$VERSION
@@ -22,7 +19,7 @@ else
TEMP_DIR="/tmp"
fi
TEMP_DIR=$(mktemp -d $TEMP_DIR/$NAME.XXXXXX)
-DEST_DIR=`git rev-parse --show-toplevel`/src/third_party/$NAME-$VERSION
+DEST_DIR=`git rev-parse --show-toplevel`/src/third_party/$NAME
# Check prerequisites: re2c, wget
if ! [ -x "$(command -v re2c)" ]; then
@@ -30,17 +27,27 @@ if ! [ -x "$(command -v re2c)" ]; then
exit 1
fi
-RE2C_VERSION=`re2c --version`
-if ! [ "re2c 0.15.3" == "$RE2C_VERSION" ]; then
- echo 'Error: re2c MUST be version 0.15.3.' >&2
- exit 1
-fi
-
if ! [ -x "$(command -v wget)" ]; then
echo 'Error: wget is not installed.' >&2
exit 1
fi
+# Derick may not upload a tarball for a release. In that case, better to create a tarball manually.
+# Can create $TARBALL manually using the following commands. For example,
+# $ cd ~
+# $ VERSION=2022.04
+# $ TARBALL=$VERSION.tar.gz
+# $ git clone git@github.com:derickr/timelib.git
+# $ cd timelib
+# Derick made the change to v2022 branch for 2022.04 version
+# $ git checkout v2022
+# .git sub-directory is unnecessary in the tarball
+# $ rm -rf .git
+# $ cd ..
+# tarball directory should be in the directory timelib-$VERSION
+# $ mv timelib timelib-$VERSION
+# $ tar czvf $TARBALL timelib-$VERSION
+# $ mv $TARBALL ~/mongo/src/third_party/scripts
if [ ! -f $TARBALL ]; then
echo "Get tarball"
wget https://github.com/derickr/timelib/archive/$TARBALL