gkdbus: Fix underflow and unreachable code bug
[platform/upstream/glib.git] / glib / libcharset / make-patch.sh
1 #!/bin/sh
2
3 if test $# = 1 ; then 
4   ORIGINAL=$1
5 else
6   echo "Usage: make-patch.sh /path/to/libcharset" 1>&2
7   exit 1
8 fi
9
10 if test -f "${ORIGINAL}/lib/localcharset.c" ; then : ; else
11   echo "Usage: make-patch.sh /path/to/libcharset" 1>&2
12   exit 1
13 fi
14
15 VERSION=$(grep VERSION= "${ORIGINAL}/configure.ac" | sed s/VERSION=//)
16
17 echo "# Patch against libcharset version ${VERSION}" > libcharset-glib.patch
18
19 for i in localcharset.c ref-add.sin ref-del.sin ; do
20   diff -u "${ORIGINAL}/lib/${i}" "${i}" >> libcharset-glib.patch
21 done
22
23 for i in glibc21.m4 codeset.m4 ; do
24   diff -u "${ORIGINAL}/m4/${i}" "${i}" >> libcharset-glib.patch
25 done
26
27 diff -u "${ORIGINAL}/include/libcharset.h.in" libcharset.h >> libcharset-glib.patch
28 diff -u "${ORIGINAL}/include/localcharset.h.in" localcharset.h >> libcharset-glib.patch