]> git.cworth.org Git - obsolete/notmuch-old/blob - lib/getdate/import
lib/getdate: Tweak xalloc-die to avoid more gnulib dependencies.
[obsolete/notmuch-old] / lib / getdate / import
1 #!/bin/sh
2 set -e
3
4 GNULIB=${HOME}/src/gnulib
5
6 if [ ! -d ${GNULIB} ]; then
7     cat <<EOF >&2
8 Error: No gnulib checkout found at ${GNULIB}
9
10 Please checkout gnulib and/or update the GNULIB variable in this script.
11 The following command may be convenient:
12
13         git clone git://git.sv.gnu.org/gnulib.git
14
15 EOF
16     exit 1
17 fi
18
19 files="c-ctype.c
20         c-ctype.h
21         getdate.y
22         getdate.h
23         gettime.c
24         intprops.h
25         timespec.h
26         verify.h
27         xalloc.h
28         xmalloc.c"
29
30 for file in $files; do
31     cp ${GNULIB}/lib/$file .
32 done
33
34 commit=$(cd ${GNULIB}; git rev-parse HEAD)
35 echo "Updated getdate source from gnulib commit:"
36 echo "$commit"