diff options
-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: $!"; |