mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
parallel: Fixed bug #37680: --wd ... not working
This commit is contained in:
parent
6921d28f9a
commit
4688ba04c9
|
@ -613,7 +613,7 @@ sub get_options_from_array {
|
|||
sub parse_options {
|
||||
# Returns: N/A
|
||||
# Defaults:
|
||||
$Global::version = 20121124;
|
||||
$Global::version = 20121126;
|
||||
$Global::progname = 'parallel';
|
||||
$Global::infinity = 2**31;
|
||||
$Global::debug = 0;
|
||||
|
@ -3711,6 +3711,10 @@ sub sshcleanup {
|
|||
$cleancmd .= "$sshcmd $serverlogin rm -f "
|
||||
. ::shell_quote_scalar($cleandir.$file.$removeworkdir).";";
|
||||
}
|
||||
if(defined $opt::workdir and $opt::workdir eq "...") {
|
||||
$cleancmd .= "$sshcmd $serverlogin rm -rf " . ::shell_quote_scalar($workdir).";";
|
||||
}
|
||||
|
||||
return $cleancmd;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,5 +41,9 @@ stdout parallel -k --wd /tmp/ --basefile 1-col.txt --trc {}.5 -S .. -v echo ">"{
|
|||
# A few rmdir errors are OK as we have multiple files in the same dirs
|
||||
find . -name '*.5' | sort
|
||||
|
||||
echo '### Test --wd ... --cleanup'
|
||||
stdout parallel -k --wd ... --cleanup -S lo -v echo ">"{}.6 ::: uNiQuE_sTrInG
|
||||
find ~/.parallel/tmp |grep uNiQuE_sTrInG
|
||||
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
|
|
|
@ -66,3 +66,5 @@ echo >./a\ b/cd\ /\ ef/efg.5
|
|||
./a b/cd / ef/efg.5
|
||||
./b/bar.5
|
||||
./b/foo.5
|
||||
### Test --wd ... --cleanup
|
||||
echo >uNiQuE_sTrInG.6
|
||||
|
|
Loading…
Reference in a new issue