diff options
author | Justin Davis <jrcd83@gmail.com> | 2011-10-07 23:12:19 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2011-10-07 23:12:19 +0200 |
commit | b73c375df8c2845c11b62c68f64ef2933ffe89b5 (patch) | |
tree | 0d4746a7c5de74c6d266cab9e6854de69c776c12 | |
parent | d6ded7530af05fec2e19bc22487b14b8bd8cb291 (diff) | |
parent | 4d348ea123d6bed169d3f7d458398b173800cbb5 (diff) | |
download | genpkg-b73c375df8c2845c11b62c68f64ef2933ffe89b5.tar.gz genpkg-b73c375df8c2845c11b62c68f64ef2933ffe89b5.tar.xz |
Merge branch 'master' of github.com:juster/pbjam
-rwxr-xr-x | bin/makepkgbuild | 4 | ||||
-rwxr-xr-x | bin/metas/perl.d/perl-dist | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/makepkgbuild b/bin/makepkgbuild index f2469bf..0df3bdb 100755 --- a/bin/makepkgbuild +++ b/bin/makepkgbuild @@ -10,7 +10,7 @@ appendpb() case "$txt" in '') return 0 ;; - *) echo "/^ *${func}()[ \\n]*{ + *) echo "/^ *${func}() *{ /^} i $txt @@ -29,7 +29,7 @@ prependpb() case "$txt" in '') return 0 ;; - *) echo "/^ *${func}()[ \\n]*{ + *) echo "/^ *${func}() *{ /^[ \t]*cd/ a $txt diff --git a/bin/metas/perl.d/perl-dist b/bin/metas/perl.d/perl-dist index a829bb9..e4af02d 100755 --- a/bin/metas/perl.d/perl-dist +++ b/bin/metas/perl.d/perl-dist @@ -356,9 +356,10 @@ sub chsrcdir { my ($srcdir, $distfile) = @_; - unless(-d $srcdir) { - mkdir $srcdir or die "mkdir $srcdir: $!"; + if (-e $srcdir) { + system("rm", "-r", $srcdir) == 0 or die "failed to rm $srcdir\n"; } + mkdir $srcdir or die "mkdir $srcdir: $!"; chdir($srcdir) or die "chdir $srcdir: $!"; unless(-f $distfile) { symlink(catfile('..', $distfile), $distfile) or die "symlink $distfile: $!"; |