X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fapi-support%2Fupdate-from-tarballs.sh;h=cd797e4affb76717cdcad0c4426effbb9fca658c;hb=HEAD;hp=da71f7e78492346bfe0dd4c0c6dee124940a6de4;hpb=7e3d76e41b3c2862ae04744b01e5e23b245393e4;p=libguestfs.git diff --git a/src/api-support/update-from-tarballs.sh b/src/api-support/update-from-tarballs.sh index da71f7e..cd797e4 100755 --- a/src/api-support/update-from-tarballs.sh +++ b/src/api-support/update-from-tarballs.sh @@ -14,9 +14,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -if [ ! -f HACKING ]; then +if [ ! -f BUGS ]; then echo "You should run this script from the top source directory." exit 1 fi @@ -39,7 +39,9 @@ for t in $tarballs; do if [ $v != "1.2.0" -a $v != "1.3.0" -a ! -f $v ]; then rm -rf "$tmpdir/*" tar -C "$tmpdir" \ - -zxf $t $p/src/guestfs-actions.c $p/src/actions.c 2>/dev/null ||: + -zxf $t $p/src/guestfs-actions.c $p/src/actions.c \ + $p/src/guestfs.c \ + 2>/dev/null ||: f="$tmpdir/$p/src/guestfs-actions.c" if [ ! -f "$f" ]; then @@ -50,7 +52,8 @@ for t in $tarballs; do fi fi - grep -Eo 'guestfs_[a-z0-9][_A-Za-z0-9]+' "$f" | + grep -Eoh 'guestfs_[a-z0-9][_A-Za-z0-9]+' \ + "$f" $tmpdir/$p/src/guestfs.c | sort -u | grep -v '_ret$' | grep -v '_args$' | @@ -81,7 +84,7 @@ for v in $rev_versions; do for sym in $symbols; do # If symbol is missing from the file, that indicates it # was added in the previous file we checked ($previous). - if ! grep -sq $sym $v; then + if ! egrep -sq \\b$sym\\b $v; then echo $sym $previous >&5 else next_symbols="$next_symbols $sym"