Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
32bfb62a
Commit
32bfb62a
authored
25 years ago
by
Steven Elliott
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added utility that generates patches for submission to
wine-patches@winehq.com.
parent
a5515e24
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/genpatch
+72
-0
72 additions, 0 deletions
tools/genpatch
with
72 additions
and
0 deletions
tools/genpatch
0 → 100755
+
72
−
0
View file @
32bfb62a
#!/usr/bin/perl
#
# genpatch - A utility that generates patches for submission to
# wine-patches@winehq.com
#
# By Steven Elliott <elliotsl@mindspring.com>
#
# This program is subject to the same license as Wine (www.winehq.com).
use
Getopt::
Std
;
use
File::
Basename
;
use
POSIX
qw(strftime)
;
use
strict
;
my
$gen_date
;
# date the patch was generated
my
%options
;
# command line options
my
@new_files
;
# new files as an array
my
$new_file
;
# new file being considered
my
$patches_dir
;
# location of the patch file
# Default the patch name to the UTC time. Use a more descriptive date for the
# patch generation date.
$options
{
n
}
=
strftime
"
%Y%m%d%H%M
",
gmtime
;
$gen_date
=
strftime
"
%Y/%m/%d %H:%M:%S UTC
",
gmtime
;
unless
(
getopts
("
n:c:f:a:
",
\
%options
))
{
print
STDERR
"
Usage: $0 [-n patch_name] [-c change_log] [-f patch_file]
"
.
"
[-a new_files]
\n
";
exit
1
;
}
$options
{
f
}
=
"
patches/
$options
{n}.diff
"
unless
(
exists
$options
{
f
});
$patches_dir
=
dirname
$options
{
f
};
@new_files
=
split
'
',
$options
{
a
};
if
(
-
d
$patches_dir
)
{
if
(
-
e
$options
{
f
})
{
print
STDERR
"
$options
{f} already exists. Aborting.
\n
";
exit
1
;
}
}
else
{
mkdir
$patches_dir
,
(
0777
&
~
umask
)
or
die
"
Unable to mkdir
$patches_dir
: $!
";
}
print
"
Generating
$options
{f}.
\n
";
open
OPT_F
,
"
>
$options
{f}
"
or
die
"
Unable to open
$options
{f} for write: $!
";
print
OPT_F
<<EOF;
Name: $options{n}
ChangeLog: $options{c}
GenDate: $gen_date
NewFiles: $options{a}
EOF
foreach
$new_file
(
@new_files
)
{
print
"
Adding
$new_file
as a new file.
\n
";
open
DIFF_IN
,
"
diff -u /dev/null
$new_file
|
"
or
die
"
Unable to
"
.
"
invoke diff: $!
";
print
OPT_F
<
DIFF_IN
>
;
close
DIFF_IN
;
}
print
"
Invoking cvs diff.
\n
";
open
CVS_IN
,
"
cvs diff -u|
"
or
die
"
Unable to invoke cvs: $!
";
print
OPT_F
<
CVS_IN
>
;
close
CVS_IN
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment