]> git.cworth.org Git - obsolete/notmuch-old/commitdiff
lib: Add script to import getdate source from a gnulib repository.
authorCarl Worth <cworth@cworth.org>
Wed, 10 Mar 2010 23:27:59 +0000 (15:27 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 10 Mar 2010 23:27:59 +0000 (15:27 -0800)
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 [new file with mode: 0755]

diff --git a/lib/getdate/import b/lib/getdate/import
new file mode 100755 (executable)
index 0000000..e3a789c
--- /dev/null
@@ -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"