From 7e5443e990f6cb1ebc2190d4276415725de7203c Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth@cworth.org>
Date: Wed, 10 Mar 2010 15:27:59 -0800
Subject: [PATCH] lib: Add script to import getdate source from a gnulib
 repository.

We're planning to copy in the getdate implementation from gnulib.
This import script will simplify the process of updating this source
given future changes to gnulib.
---
 lib/getdate/import | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100755 lib/getdate/import

diff --git a/lib/getdate/import b/lib/getdate/import
new file mode 100755
index 00000000..e3a789c3
--- /dev/null
+++ b/lib/getdate/import
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+
+GNULIB=${HOME}/src/gnulib
+
+if [ ! -d ${GNULIB} ]; then
+    cat <<EOF >&2
+Error: No gnulib checkout found at ${GNULIB}
+
+Please checkout gnulib and/or update the GNULIB variable in this script.
+The following command may be convenient:
+
+	git clone git://git.sv.gnu.org/gnulib.git
+
+EOF
+    exit 1
+fi
+
+files="c-ctype.c
+	c-ctype.h
+	getdate.y
+	getdate.h
+	gettime.c
+	intprops.h
+	timespec.h
+	verify.h
+	xalloc.h
+	xalloc-die.c
+	xmalloc.c"
+
+for file in $files; do
+    cp ${GNULIB}/lib/$file .
+done
+
+commit=$(cd ${GNULIB}; git rev-parse HEAD)
+echo "Updated getdate source from gnulib commit:"
+echo "$commit"
-- 
2.45.2