2001-05-01 Conrad Canterford <conrad@mail.watersprite.com.au>

* make-gnucash-patch.in: add --file option to allow single file
	patches to be made.

	* README.patches (new file): Moved patch instructions from README
	file into this new file, and added detailed descriptions of all
	the options for make-gnucash-patch.

        * README: see above


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4098 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas
2001-05-01 20:58:00 +00:00
parent 73277fb3df
commit bc69db7765
6 changed files with 249 additions and 90 deletions

View File

@@ -85,9 +85,11 @@ my $help;
my $zip = 1; # defaults to on
my $diffname = undef;
my $ignorename = undef;
my $filename = undef;
$result = GetOptions("old=s" => \$old, "new=s" => \$new,
"prefix=s" => \$gnc_home, "help" => \$help,
"file=s" => \$filename, "ask!" => \$ask_description,
"diff=s" => \$diffname, "uuencode!" => \$::should_uuencode,
"zip!" => \$zip, "ignore=s" => \$ignorename);
@@ -98,19 +100,33 @@ if ($help or $result == 0) {
printf "--new \"newdir\" Directory with modified copy\n";
printf "--prefex \"homedir\" Full path of parent directory\n";
printf "--diff \"diffname\" Output name for diff file\n";
printf "--file \"filename\" Make patch for filename ONLY\n";
printf "--ignore \"igname\" File containing file matches to ignore\n";
printf "--(no)uuencode Enable or disable uuencoded output\n";
printf " (Defaults to enabled)\n";
printf "--(no)zip Enable or disable gzipped output\n";
printf " (Defaults to enabled)\n";
printf "--(no)ask Enable or disable prompting for description\n";
printf " (Defaults to enabled)\n";
printf "and of course:\n";
printf "--help Displays this text\n";
printf "\nAll options can be abbreviated to their shortest unique\n";
printf " form: --o, --ne, --p, --d, --i, --u/--nou, --z/--noz, and --h\n";
printf " form: --o, --ne, --p, --d, --f, --i, --u/--nou, --z/--noz, \n";
printf " --a/--noa, and --h\n";
printf "\n";
exit 1;
}
# if explicit filename given, build required MANIFEST file
if (defined($filename)) {
open (FN, ">$gnc_home/tmp.MANIFEST") or die "Couldn't create MANIFEST file";
printf (FN "# Temporary manifest file for make-gnucash-patch -f option\n");
printf (FN "\n");
printf (FN "%s\n", $filename);
close (FN);
}
# Switch to the home directory
print "Changing directory to $gnc_home\n";
chdir $gnc_home or die "Can't cd!\n";
@@ -136,8 +152,16 @@ my @args = ('-verbose', '-diff', 'diff -up', '-exclude-vc');
if (not $::ask_description) {
push(@args, '-description', '');
}
# Add in the exclude patterns from the __DATA__ section
push_exclusions(\@args);
# If -f options given, use generated manifest file
# otherwise, add exclusions and proceed as normal
if (defined($filename)) {
push(@args, '-manifest', "$gnc_home/tmp.MANIFEST");
}
else {
# Add in the exclude patterns from the __DATA__ section
push_exclusions(\@args);
}
sub push_exclusions {
my $args = shift;