diff --git a/scripts/stableids b/scripts/stableids index 3297581..5bd3e95 100755 --- a/scripts/stableids +++ b/scripts/stableids @@ -151,11 +151,13 @@ exit 0 if ($dump_only); store(\%ids, $idsfile) or die "cannot write $idsfile"; push @to_delete, $idsfile; -system("tar -cC $patchpar $patchdir|ssh -C $machine -o StrictHostKeyChecking=no 'tar -xC $patchpar'") == 0 || - die "ssh didn't start"; -print "Written patches and ids to $machine:$patchpath\n"; +if ($machine ne 'localhost') { + system("tar -cC $patchpar $patchdir|ssh -C $machine -o StrictHostKeyChecking=no 'tar -xC $patchpar'") == 0 || + die "ssh didn't start"; + unlink(@to_delete) or print STDERR "cannot delete some temp files\n"; + rmdir("$patchpath") or print STDERR "cannot remove $patchpath\n"; +} -unlink(@to_delete) or print STDERR "cannot delete some temp files\n"; -rmdir("$patchpath") or print STDERR "cannot remove $patchpath\n"; +print "Written patches and ids to $machine:$patchpath\n"; 0;