From: cjwatson <> Date: Wed, 10 Aug 2005 06:12:07 +0000 (-0800) Subject: [project @ 2005-08-09 23:12:07 by cjwatson] X-Git-Tag: release/2.6.0~660 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0a04478d40aeca91739679559f9e9cd04a394ba2;p=debbugs.git [project @ 2005-08-09 23:12:07 by cjwatson] Perl has a perfectly good File::Path::mkpath; stop shelling out to mkdir -p --- diff --git a/scripts/expire.in b/scripts/expire.in index 99a60c6e..97b4dbc0 100755 --- a/scripts/expire.in +++ b/scripts/expire.in @@ -1,8 +1,9 @@ #!/usr/bin/perl -# $Id: expire.in,v 1.22 2005/08/09 23:09:42 cjwatson Exp $ +# $Id: expire.in,v 1.23 2005/08/09 23:12:07 cjwatson Exp $ # Load modules and set environment use File::Copy; +use File::Path; $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; @@ -75,7 +76,7 @@ while (length($ref=shift(@list))) { print "$ref removing $mref\n" if $debug; my $dir = get_hashname($mref); if ($gSaveOldBugs) { - `mkdir -p "archive/$dir"`; + mkpath("archive/$dir"); link( "db-h/$dir/$mref.log", "archive/$dir/$mref.log" ) || copy( "db-h/$dir/$mref.log", "archive/$dir/$mref.log" ); link( "db-h/$dir/$mref.status", "archive/$dir/$mref.status" ) || copy( "db-h/$dir/$mref.status", "archive/$dir/$mref.status" ); link( "db-h/$dir/$mref.summary", "archive/$dir/$mref.summary" ) || copy( "db-h/$dir/$mref.summary", "archive/$dir/$mref.summary" );