diff options
Diffstat (limited to 'Build-tools')
-rwxr-xr-x | Build-tools/mysql-copyright | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright index 4c40908e7ed..dbe494b8aab 100755 --- a/Build-tools/mysql-copyright +++ b/Build-tools/mysql-copyright @@ -131,13 +131,17 @@ sub main rename($destdir, $newdistname); # tar the new distribution - `tar cz -f $opt_target/$newdistname.tar.gz $newdistname`; + `tar cz -f $WD/$newdistname.tar.gz $newdistname`; $pec= $? >> 8; abort($dir, "Making new tar archive failed!\n") if ($pec); # remove temporary directory - chdir ".."; - `rm -rf $dir/`; + chdir($WD) or print "$! Unable to move up one dir\n"; + print "deleting temp dir $dir\n"; + if (-d "$WD/$dir") { + system("rm -rf $WD/$dir") or print "$! Unable to delete $WD/$dir!\n"; + } + } exit(0); } |