diff options
author | Harald Hoyer <harald@redhat.com> | 2011-11-09 09:51:15 +0100 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2011-11-15 09:47:19 +0100 |
commit | 9af39cbe314a15011d81bbcb411de04cef16d4da (patch) | |
tree | 939f004c6e3e2845e051081d5dfe095994fa22ee /git2spec.pl | |
parent | 1133b5e07ac7647260ed742734266e836625049c (diff) | |
download | dracut-9af39cbe314a15011d81bbcb411de04cef16d4da.tar.gz dracut-9af39cbe314a15011d81bbcb411de04cef16d4da.tar.bz2 dracut-9af39cbe314a15011d81bbcb411de04cef16d4da.zip |
Makefile, git2spec.pl: use temporary builddir
to build the dracut rpm, use a temporary builddir
Diffstat (limited to 'git2spec.pl')
-rwxr-xr-x | git2spec.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git2spec.pl b/git2spec.pl index 9db42aa1..27e58894 100755 --- a/git2spec.pl +++ b/git2spec.pl @@ -18,8 +18,9 @@ sub last_tag { sub create_patches { my $tag=shift; + my $pdir=shift; my $num=0; - open( GIT, 'git format-patch -N --no-signature '.$tag.' |'); + open( GIT, 'git format-patch -N --no-signature -o "'.$pdir.'" '.$tag.' |'); @lines=<GIT>; close GIT; # be done return @lines; @@ -29,8 +30,9 @@ use POSIX qw(strftime); my $datestr = strftime "%Y%m%d", gmtime; my $tag=shift; +my $pdir=shift; $tag=&last_tag if not defined $tag; -my @patches=&create_patches($tag); +my @patches=&create_patches($tag, $pdir); my $num=$#patches + 2; $tag=~s/[^0-9]+?([0-9]+)/$1/; my $release="$num.git$datestr"; |