2008-11-10 15:25:24 +08:00
|
|
|
AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl
|
2004-10-09 05:56:10 +08:00
|
|
|
# @configure_input@
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# clcommit (GNU @PACKAGE@) version 2.1
|
2004-10-09 05:56:10 +08:00
|
|
|
# Written by Gary V. Vaughan <gary@gnu.org>
|
|
|
|
# and Alexandre Oliva <aoliva@redhat.com>
|
|
|
|
|
2010-06-09 17:53:56 +08:00
|
|
|
# Copyright (C) 1999, 2000, 2004, 2006, 2008, 2009, 2010 Free Software
|
|
|
|
# Foundation, Inc.
|
2004-10-09 05:56:10 +08:00
|
|
|
# This is free software; see the source for copying conditions. There is NO
|
|
|
|
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# Clcommit is free software; you can redistribute it and/or modify
|
2004-10-09 05:56:10 +08:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# Clcommit is distributed in the hope that it will be useful, but
|
2004-10-09 05:56:10 +08:00
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2004-10-09 05:56:10 +08:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# along with clcommit; see the file COPYING. If not, a copy
|
|
|
|
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
|
|
|
|
# or obtained by writing to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2008-09-07 02:41:39 +08:00
|
|
|
# Usage: $progname [OPTION]... [--] [filepattern ...]
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2008-09-07 02:41:39 +08:00
|
|
|
# -a AUTHOR --author=AUTHOR override changeset author name with AUTHOR
|
|
|
|
# -C FILE --changelog=FILE extract commit message from specified FILE
|
2004-10-23 02:05:29 +08:00
|
|
|
# --debug enable verbose shell tracing
|
|
|
|
# -n --dry-run don't commit anything
|
|
|
|
# --fast same as --force --first
|
2010-06-05 06:40:40 +08:00
|
|
|
# -F FILE --file=FILE read commit message from FILE
|
2008-09-07 02:41:39 +08:00
|
|
|
# -1 --first extract first entry from ChangeLog, no git diff
|
2004-10-23 02:05:29 +08:00
|
|
|
# -f --force don't check (unless *followed* by -n), and just
|
|
|
|
# display commit message instead of running $PAGER
|
2008-09-07 02:41:39 +08:00
|
|
|
# --from=ADDRESS override default from ADDRESS in commit email
|
2010-06-05 06:40:40 +08:00
|
|
|
# -m STRING --message=STRING set commit message to STRING
|
2008-09-07 02:41:39 +08:00
|
|
|
# --msg=STRING same as -m
|
|
|
|
# -p --push push the changes back to origin
|
2004-10-23 02:05:29 +08:00
|
|
|
# -r [FILE] --rcfile[=FILE] read default option from FILE [./.clcommitrc]
|
2010-06-05 06:40:40 +08:00
|
|
|
# -s ADDR --sendmail=ADDR send commit email of the differences to ADDRESS
|
2004-10-23 02:05:29 +08:00
|
|
|
# --signature[=FILE] add FILE to the end of the email [~/.signature]
|
2008-09-07 02:41:39 +08:00
|
|
|
# --signoff add a Signed-off-by attribution at the end
|
2004-10-23 02:05:29 +08:00
|
|
|
# -S TEXT --summary=TEXT specify a TEXT subject line for the commit email
|
2008-09-08 14:24:06 +08:00
|
|
|
# --tags in conjunction with -p, also push tags
|
2004-10-23 02:05:29 +08:00
|
|
|
# -v --verbose run in verbose mode
|
|
|
|
# --version print version information
|
|
|
|
# -h,-? --help print short or long help message
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2008-09-07 02:41:39 +08:00
|
|
|
# This script eases checking in changes to git-maintained projects
|
2004-10-09 05:56:10 +08:00
|
|
|
# with ChangeLog files. It will check that there have been no
|
2009-02-19 05:47:41 +08:00
|
|
|
# conflicting commits in the git repository and print which files it
|
2004-10-09 05:56:10 +08:00
|
|
|
# is going to commit to stderr. A list of files to compare and to
|
|
|
|
# check in can be given in the command line. If it is not given, all
|
2008-09-07 02:41:39 +08:00
|
|
|
# files in the current working directory are considered for check in.
|
2004-10-09 05:56:10 +08:00
|
|
|
|
|
|
|
# The commit message will be extracted from the differences between a
|
|
|
|
# file named ChangeLog* in the commit list, or named after -C, and the
|
|
|
|
# one in the repository (unless a message was specified with `-m' or
|
|
|
|
# `-F'). An empty message is not accepted (but a blank line is). If
|
|
|
|
# the message is acceptable, it will be presented for verification
|
|
|
|
# (and possible edition) using the $PAGER environment variable (or
|
|
|
|
# `more', if it is not set, or `cat', if the `-f' switch is given).
|
|
|
|
# If $PAGER exits successfully, the modified files (at that moment)
|
|
|
|
# are checked in, unless `-n' was specified, in which case nothing is
|
|
|
|
# checked in.
|
|
|
|
|
|
|
|
# Report bugs to <gary@gnu.org>
|
|
|
|
|
2008-09-07 02:41:39 +08:00
|
|
|
: ${GIT="git"}
|
2004-10-09 05:56:10 +08:00
|
|
|
: ${MAILNOTIFY="mailnotify"}
|
|
|
|
: ${MKSTAMP="mkstamp"}
|
|
|
|
|
2007-02-26 18:24:25 +08:00
|
|
|
test -f "libltdl/config/$MAILNOTIFY" && MAILNOTIFY="libltdl/config/$MAILNOTIFY"
|
|
|
|
test -f "libltdl/config/$MKSTAMP" && MKSTAMP="libltdl/config/$MKSTAMP"
|
2004-10-09 05:56:10 +08:00
|
|
|
|
|
|
|
PROGRAM=clcommit
|
|
|
|
|
2008-11-10 15:25:24 +08:00
|
|
|
m4_divert_pop
|
2004-10-09 05:56:10 +08:00
|
|
|
m4_include([getopt.m4sh])
|
|
|
|
|
2007-03-06 08:46:56 +08:00
|
|
|
M4SH_VERBATIM([[
|
2010-06-05 06:40:40 +08:00
|
|
|
# Locations for important files:
|
|
|
|
log_dir="`func_mktempdir`"
|
|
|
|
log_file="$log_dir/log"
|
|
|
|
push_conflicts="$log_dir/git_push.log"
|
2008-09-07 02:41:39 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
trap '$RM -r "$log_dir"; exit $EXIT_FAILURE' 1 2 15
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2005-02-01 20:31:16 +08:00
|
|
|
# try to find out whether read supports -r
|
|
|
|
if echo bt | tr b '\\' | { read -r line; test "X$line" = 'X\t'; } 2>/dev/null
|
|
|
|
then
|
|
|
|
read_r='read -r'
|
|
|
|
else
|
|
|
|
read_r=read
|
|
|
|
fi
|
2010-06-05 06:40:40 +08:00
|
|
|
]])
|
2005-02-01 20:31:16 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
dnl SHORT LONG DEFAULT INIT
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
M4SH_GETOPTS(
|
|
|
|
[1], [--first], [], [],
|
|
|
|
[a^!], [--author], [], [
|
|
|
|
git_flags="${git_flags+$git_flags }--author=$opt_author"],
|
|
|
|
[C@], [--changelog|--Change[Ll]og], [], [],
|
|
|
|
[F!], [--file], [], [
|
|
|
|
cat "[$]1" > "$log_file" || break],
|
|
|
|
[f], [--force], [], [
|
|
|
|
PAGER=cat],
|
|
|
|
[m!], [--message|--msg], [], [
|
|
|
|
echo "[$]1" > "$log_file"],
|
|
|
|
[n], [--dry-run|--dryrun], [], [
|
|
|
|
mailnotify_flags="${mailnotify_flags+$mailnotify_flags }--dry-run"],
|
|
|
|
[p], [--push], [], [],
|
|
|
|
[r@?], [--rcfile], [./.clcommitrc], [
|
|
|
|
# The funny quoting allows keeping one option per line in $opt_rcfile:
|
|
|
|
eval set dummy `echo \`cat $opt_rcfile\` '${1+"[$]@"}'`
|
|
|
|
shift],
|
|
|
|
[S!], [--summary], [], [],
|
|
|
|
[s^!], [--sendmail], [], [],
|
|
|
|
[v], [--verbose], [], [
|
|
|
|
mailnotify_flags="${mailnotify_flags+$mailnotify_flags }--verbose"],
|
|
|
|
[], [--fast], [], [
|
|
|
|
set dummy --force --first ${1+"[$]@"}; shift],
|
|
|
|
[^!], [--from], [], [
|
|
|
|
mailnotify_flags="${mailnotify_flags+$mailnotify_flags }--from=$opt_from"],
|
|
|
|
[@?], [--signature], [], [
|
|
|
|
test -n "$opt_signature" || opt_signature="$HOME/.signature"],
|
|
|
|
[], [--signoff], [], [
|
|
|
|
git_flags="${git_flags+$git_flags }$opt"],
|
|
|
|
[], [--tags], [], [],
|
|
|
|
[
|
|
|
|
# pass debug flag along to mailnotify
|
2010-06-10 22:02:48 +08:00
|
|
|
test "$opt_debug" != ":" &&
|
2010-06-05 06:40:40 +08:00
|
|
|
mailnotify_flags="${mailnotify_flags+$mailnotify_flags }--debug"
|
|
|
|
|
|
|
|
# validate $opt_first, $opt_file and $opt_message
|
|
|
|
if $opt_first; then
|
|
|
|
test -n "$opt_file$opt_message" &&
|
|
|
|
func_error "you can have at most one of -m, -F and -1"
|
|
|
|
else
|
|
|
|
test -n "$opt_file" && test -n "$opt_message" &&
|
|
|
|
func_error "you can have at most one of -m, -F and -1"
|
|
|
|
fi
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# validate $opt_from and $opt_signature
|
|
|
|
test -n "$opt_sendmail" || {
|
2004-10-09 05:56:10 +08:00
|
|
|
# can't have a from address without a destination address
|
2010-06-05 06:40:40 +08:00
|
|
|
test -n "$opt_from" &&
|
2004-10-09 05:56:10 +08:00
|
|
|
func_error "can't use --from without --sendmail." && exit_cmd=exit
|
|
|
|
|
|
|
|
# can't use a signature file without a destination address
|
2010-06-05 06:40:40 +08:00
|
|
|
test -n "$opt_signature" &&
|
2004-10-09 05:56:10 +08:00
|
|
|
func_error "can't use --signature without --sendmail." && exit_cmd=exit
|
2010-06-05 06:40:40 +08:00
|
|
|
}
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# validate $opt_tags
|
|
|
|
$opt_push || {
|
|
|
|
$opt_tags &&
|
|
|
|
func_error "can't use --tags without --push." && exit_cmd=exit
|
|
|
|
}
|
|
|
|
])
|
2008-09-08 14:24:06 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
M4SH_VERBATIM([[
|
|
|
|
# Bail out on command errors!
|
|
|
|
set -e
|
2004-10-09 05:56:10 +08:00
|
|
|
|
|
|
|
# func_check_conflicts
|
|
|
|
func_check_conflicts ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
func_verbose "checking for commit conflicts..."
|
2008-09-07 19:53:16 +08:00
|
|
|
if $GIT push --dry-run > "$push_conflicts" 2>&1; then :; else
|
|
|
|
cat "$push_conflicts" >&2
|
|
|
|
func_fatal_error "some conflicts were found with upstream repository, aborting..."
|
2004-10-09 05:56:10 +08:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# func_check_commit_msg
|
|
|
|
func_check_commit_msg ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
if test -z "$opt_changelog"; then
|
2004-10-09 05:56:10 +08:00
|
|
|
for f in ${1+"$@"}; do
|
|
|
|
case "$f" in
|
|
|
|
ChangeLog* | */ChangeLog*)
|
2010-06-05 06:40:40 +08:00
|
|
|
if test -z "$opt_changelog"; then
|
|
|
|
opt_changelog="$f"
|
2004-10-09 05:56:10 +08:00
|
|
|
else
|
2010-06-05 06:40:40 +08:00
|
|
|
func_fatal_error "multiple ChangeLog files: $opt_changelog and $f"
|
2004-10-09 05:56:10 +08:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
func_verbose "checking commit message..."
|
2010-05-22 19:10:27 +08:00
|
|
|
separate_summary=: # whether to separate summary lines for git
|
2004-10-09 05:56:10 +08:00
|
|
|
if $opt_first; then
|
|
|
|
skipping=:
|
2010-06-05 06:40:40 +08:00
|
|
|
$SED 's,^,+,' < ${opt_changelog-ChangeLog} |
|
2005-02-01 20:31:16 +08:00
|
|
|
while $read_r line; do
|
2004-10-09 05:56:10 +08:00
|
|
|
case "$line" in
|
|
|
|
"+") if $skipping; then skipping=false; else break; fi;;
|
|
|
|
"+ "*)
|
|
|
|
func_error "*** Warning: lines should start with tabs, not spaces; ignoring line:"
|
|
|
|
echo "$line" | $SED 's/^.//' >&2;;
|
2010-05-22 19:10:27 +08:00
|
|
|
"+ *"*) # asterisk marks end of summary line
|
|
|
|
$skipping || echo "$line"
|
|
|
|
separate_summary=false ;;
|
|
|
|
"+ "*".") # summary line must end with a period
|
|
|
|
$skipping || {
|
|
|
|
echo "$line"
|
|
|
|
$separate_summary && echo "+ "
|
|
|
|
separate_summary=false
|
|
|
|
};;
|
|
|
|
"+ "*) # no separator for multiline summary
|
|
|
|
echo "$line"
|
|
|
|
separate_summary=false ;;
|
2004-10-09 05:56:10 +08:00
|
|
|
esac
|
|
|
|
done |
|
|
|
|
$SED 's,^\+ ,,' > "$log_file" || exit $EXIT_FAILURE
|
|
|
|
else
|
2010-06-05 06:40:40 +08:00
|
|
|
$GIT diff ${opt_changelog-ChangeLog} |
|
2005-02-01 20:31:16 +08:00
|
|
|
while $read_r line; do
|
2004-10-09 05:56:10 +08:00
|
|
|
case $line in
|
|
|
|
"--- "*) :;;
|
|
|
|
"-"*)
|
|
|
|
func_error "*** Warning: the following line in ChangeLog diff is suspicious:"
|
|
|
|
echo "$line" | $SED 's/^.//' >&2;;
|
|
|
|
"+ "*)
|
|
|
|
func_error "*** Warning: lines should start with tabs, not spaces; ignoring line:"
|
|
|
|
echo "$line" | $SED 's/^.//' >&2;;
|
|
|
|
"+") echo ;;
|
2010-05-22 19:10:27 +08:00
|
|
|
"+ *"*) # asterisk marks end of summary line
|
|
|
|
echo "$line"
|
|
|
|
separate_summary=false ;;
|
|
|
|
"+ "*".") # summary line must end with a period
|
|
|
|
echo "$line"
|
|
|
|
$separate_summary && echo "+ "
|
|
|
|
separate_summary=false ;;
|
|
|
|
"+ "*) # no separator for multiline summary
|
|
|
|
echo "$line"
|
|
|
|
separate_summary=false ;;
|
2004-10-09 05:56:10 +08:00
|
|
|
esac
|
|
|
|
done |
|
|
|
|
$SED -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \
|
|
|
|
|| exit $EXIT_FAILURE
|
|
|
|
fi
|
|
|
|
# The sed script above removes "+TAB" from the beginning of a line, then
|
|
|
|
# deletes the first and/or the last line, when they happen to be empty
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# func_commit
|
|
|
|
func_commit ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2008-09-07 02:41:39 +08:00
|
|
|
${PAGER-more} "$log_file" || exit $EXIT_FAILURE
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2008-09-07 02:41:39 +08:00
|
|
|
sleep 1 # give the user some time for a ^C
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2008-09-07 02:41:39 +08:00
|
|
|
subject=`git status 2>/dev/null | $SED -n 's/^#.*[mad][ode][dl].*ed: *//p'`
|
|
|
|
test $# -gt 0 && subject="$@"
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2008-09-07 05:19:01 +08:00
|
|
|
test $# -gt 0 || { set dummy -a; shift; }
|
2010-06-09 20:34:34 +08:00
|
|
|
func_show_eval "$GIT commit $git_flags -F $log_file ${1+$@}" "exit $EXIT_FAILURE"
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
$opt_push && {
|
2010-06-09 20:34:34 +08:00
|
|
|
func_show_eval "$GIT push"
|
|
|
|
$opt_tags && func_show_eval "$GIT push --tags"
|
2010-06-05 06:40:40 +08:00
|
|
|
}
|
2004-10-23 01:37:42 +08:00
|
|
|
|
|
|
|
:
|
2004-10-09 05:56:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# func_mailnotify
|
|
|
|
func_mailnotify ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2004-11-20 01:04:22 +08:00
|
|
|
notify_file="${log_dir}/notify"
|
2010-06-05 06:40:40 +08:00
|
|
|
func_verbose "Mailing commit notification to \"$opt_sendmail\""
|
2004-10-09 05:56:10 +08:00
|
|
|
|
|
|
|
{
|
|
|
|
echo Subject: $subject
|
2008-09-07 03:50:40 +08:00
|
|
|
test -f .git/config &&
|
|
|
|
echo "Root: `$SED -n 's,^ url = .*:\(.*\)$,\1,p' .git/config`"
|
2004-10-09 05:56:10 +08:00
|
|
|
test -f $MKSTAMP &&
|
2008-09-07 03:50:40 +08:00
|
|
|
echo "Timestamp: `$SHELL $MKSTAMP .`"
|
|
|
|
echo "Branch: `$GIT branch | sed -n 's/\* //p'`"
|
|
|
|
test -f .git/config &&
|
|
|
|
echo "Changes by: `$SED -n 's,^ url = \([^:]*\):.*$,\1,p' .git/config`"
|
2004-10-09 05:56:10 +08:00
|
|
|
echo ""
|
|
|
|
echo "Log Message:"
|
|
|
|
$SED -e 's,^, ,' "$log_file"
|
2010-06-05 06:40:40 +08:00
|
|
|
test -f "$opt_signature" && {
|
2004-10-23 01:37:42 +08:00
|
|
|
echo '-- '
|
2010-06-05 06:40:40 +08:00
|
|
|
cat "$opt_signature"
|
2004-10-23 01:37:42 +08:00
|
|
|
}
|
2004-10-09 05:56:10 +08:00
|
|
|
} > "$notify_file"
|
|
|
|
|
|
|
|
${PAGER-more} "$notify_file" || break
|
|
|
|
|
|
|
|
# Break out the subject line again
|
2006-01-22 00:44:41 +08:00
|
|
|
my_mail_subject=`$SED -e '
|
|
|
|
1{
|
|
|
|
s/^Subject: *//
|
|
|
|
q
|
|
|
|
}' "$notify_file"`
|
2004-10-09 05:56:10 +08:00
|
|
|
my_mail_body=`$SED -e '2,$p;d' "$notify_file"`
|
|
|
|
echo "$my_mail_body" > "$notify_file"
|
|
|
|
|
2004-10-22 20:10:31 +08:00
|
|
|
func_quote_for_eval "$my_mail_subject"
|
|
|
|
func_show_eval "$MAILNOTIFY $mailnotify_flags \
|
|
|
|
-s $func_quote_for_eval_result -m 'text/plain' -f '$notify_file' \
|
2010-06-05 06:40:40 +08:00
|
|
|
-- $opt_sendmail"
|
2004-10-09 05:56:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ----- ##
|
|
|
|
## main. ##
|
|
|
|
## ----- ##
|
|
|
|
|
|
|
|
{
|
|
|
|
test -f "$log_file" || func_check_commit_msg
|
|
|
|
|
2007-03-06 08:46:56 +08:00
|
|
|
grep '[^ ]' < "$log_file" > /dev/null ||
|
2004-10-09 05:56:10 +08:00
|
|
|
func_fatal_error "empty commit message, aborting"
|
|
|
|
|
2010-06-09 18:03:22 +08:00
|
|
|
# We expect line 2 to be blank, since it separates the git summary line from
|
|
|
|
# the commit message body, but any others are probably an error:
|
|
|
|
if sed 2d "$log_file" | grep '^$' > /dev/null; then
|
2004-10-09 05:56:10 +08:00
|
|
|
func_error "*** Warning: blank lines should not appear within commit messages."
|
|
|
|
func_error "*** They should be used to separate distinct commits."
|
|
|
|
fi
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# $opt_force says to force the changes through without checking for conflicts
|
|
|
|
$opt_push && {
|
|
|
|
$opt_force || func_check_conflicts
|
|
|
|
}
|
2008-09-07 19:53:16 +08:00
|
|
|
|
2004-10-09 05:56:10 +08:00
|
|
|
# Do not check for empty $log_file again, even though the user might have
|
|
|
|
# zeroed it out. If s/he did, it was probably intentional.
|
2010-06-05 06:40:40 +08:00
|
|
|
func_commit ${1+"$@"}
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# Send a copy of the log_file if opt_sendmail was set:
|
2008-09-07 19:53:16 +08:00
|
|
|
subject=`sed -n '1p' "$log_file"`
|
2010-06-05 06:40:40 +08:00
|
|
|
if test -n "$opt_sendmail"; then
|
2008-09-07 02:41:39 +08:00
|
|
|
if ! $opt_push; then
|
|
|
|
func_warning "Mail notification NOT sent for commit to local repository."
|
|
|
|
else
|
|
|
|
func_mailnotify
|
|
|
|
fi
|
2004-10-09 05:56:10 +08:00
|
|
|
fi
|
|
|
|
|
2004-11-20 01:04:22 +08:00
|
|
|
$RM -r "$log_dir"
|
2004-10-09 05:56:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
exit $EXIT_SUCCESS
|
|
|
|
|
|
|
|
# Local Variables:
|
|
|
|
# mode:shell-script
|
|
|
|
# sh-indentation:2
|
|
|
|
# End:
|
2007-03-06 08:46:56 +08:00
|
|
|
]])
|
|
|
|
|