mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 10:51:09 -06:00
a0e4b34fbf
Add a GnuCash-specific interface to the src/calculation expression parser. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2736 57a11ea4-9604-0410-9ed3-97b8803252fd
161 lines
3.3 KiB
Plaintext
161 lines
3.3 KiB
Plaintext
#!@-PERL-@ -w
|
|
#
|
|
# This perl script is used to make a patch for your GnuCash
|
|
# development work. All patches should be submitted to the
|
|
# mailing list gnucash-patches@gnucash.org. For more info
|
|
# consult the README.
|
|
#
|
|
# This script requires the programs 'makepatch', 'gzip',
|
|
# 'diff', and 'uuencode'.
|
|
#
|
|
# Author: Dave Peticolas <dave@krondo.com>
|
|
|
|
use strict;
|
|
|
|
###########################################################
|
|
# This section must be configured for your own setup. #
|
|
###########################################################
|
|
|
|
# The directory with the original gnucash sources
|
|
my $old = 'gnucash.pristine';
|
|
|
|
# The directory where you do your development
|
|
my $new = 'gnucash';
|
|
|
|
# The directory where the above two directories reside
|
|
my $gnc_home = '/usr/src/misc/gnc';
|
|
|
|
###########################################################
|
|
# This section should not need to be modified. #
|
|
###########################################################
|
|
|
|
# Allow the user to override the defaults with evnt vars.
|
|
|
|
if($ENV{'GNC_MAKEPATCH_OLD_DIR'}) {
|
|
$old = $ENV{'GNC_MAKEPATCH_OLD_DIR'};
|
|
}
|
|
|
|
if($ENV{'GNC_MAKEPATCH_NEW_DIR'}) {
|
|
$new = $ENV{'GNC_MAKEPATCH_NEW_DIR'};
|
|
}
|
|
|
|
if($ENV{'GNC_MAKEPATCH_HOME_DIR'}) {
|
|
$gnc_home = $ENV{'GNC_MAKEPATCH_HOME_DIR'};
|
|
}
|
|
|
|
# Switch to the home directory
|
|
chdir $gnc_home or die "Can't cd!\n";
|
|
|
|
# Erase the old files
|
|
unlink('gnc.diff', 'gnucash.diff.gz', 'gnucash.diff.gz.uue');
|
|
|
|
# Start out with our basic makepatch arguments
|
|
my @args = ('-diff', 'diff -u', '-exclude-vc');
|
|
|
|
# Add in the exclude patterns from the __DATA__ section
|
|
foreach my $pat (<DATA>) {
|
|
chomp($pat);
|
|
push(@args, '-exclude', $pat) if $pat;
|
|
}
|
|
|
|
# Add the from and to directories for makepatch
|
|
push(@args, $old, $new);
|
|
|
|
# Invoke makepatch with standard out redirected to 'gnucash.diff'
|
|
open(OLDOUT, ">&STDOUT");
|
|
open(STDOUT, "> gnucash.diff") || die "Can't redirect stdout";
|
|
system('makepatch', @args);
|
|
close(STDOUT);
|
|
open(STDOUT, ">&OLDOUT");
|
|
|
|
# Make a copy of the ascii diff in 'gnc.diff'
|
|
system('cp gnucash.diff gnc.diff');
|
|
|
|
# Compress the patch
|
|
system('gzip -9vf gnucash.diff');
|
|
|
|
# UU encode the compressed patch
|
|
# 'gnucash.diff.gz.uue' is the file you send.
|
|
system('uuencode gnucash.diff.gz gnucash.diff.gz > gnucash.diff.gz.uue');
|
|
|
|
exit(0);
|
|
|
|
__DATA__
|
|
|
|
#*#
|
|
*.a
|
|
*.bak
|
|
*.bin
|
|
*.diff
|
|
*.diffs
|
|
*.gmo
|
|
*.lo
|
|
*.log
|
|
*.mo
|
|
*.moc
|
|
*.o
|
|
*.orig
|
|
*.patch
|
|
*.rej
|
|
*.tar.gz
|
|
*.wrap
|
|
*.xac.*.xac
|
|
.#*
|
|
.deps
|
|
.libs
|
|
Makefile
|
|
Makefile.in
|
|
Makefile.init
|
|
POTFILES
|
|
TAGS
|
|
aclocal.m4
|
|
cat-id-tbl.c
|
|
conf.h
|
|
config.cache
|
|
config.h
|
|
config.log
|
|
config.status
|
|
configure
|
|
doc/sgml/C/gnucash/*
|
|
doc/sgml/C/gnucash.junk
|
|
errs*
|
|
g-wrap-guile
|
|
g-wrap.info
|
|
gnc-autogen.h
|
|
gnucash-design.html
|
|
gnucash-engine-perl5_wrap.c
|
|
gnucash-engine-perl5_wrap_int.c
|
|
gnucash.engine.i
|
|
gnucash.pm
|
|
gnucash.pot
|
|
intl/libintl.h
|
|
intl/po2tbl.sed
|
|
lib/finance-quote/blib
|
|
lib/finance-quote/pm_to_blib
|
|
libgncengine.la
|
|
libgwrapguile.la
|
|
libgwraprs.la
|
|
libtool
|
|
make-gnucash-patch
|
|
po/extract-macros.perl
|
|
po/pseudo-source.c
|
|
rpm/gnucash.spec
|
|
src/doc/design/gnucash-design.info
|
|
src/doc/design/stamp-vti
|
|
src/doc/design/version.texi
|
|
src/gnome/glade-cb-gnc-dialogs.c
|
|
src/gnome/glade-support-gnc-dialogs.c
|
|
src/gnucash
|
|
src/guile/gnc.c
|
|
src/guile/gnc.h
|
|
src/guile/gnc.html
|
|
src/guile/gnucash.c
|
|
src/guile/i18n.h
|
|
src/optional/swig/gnucash.engine_wrap.doc
|
|
src/optional/swig/libgncswig.la
|
|
src/quotes/gnc-prices
|
|
src/scm/bootstrap.scm
|
|
doc/sgml/C/gnucash
|
|
stamp-cat-id
|
|
stamp-h
|