i3status/testcases/011-cpu-usage/cleanup.pl
Emeric Planet 884e4da673 Fix CPU unit tests (#239)
Support any amount of available cores on testing machine.
2017-08-29 19:01:30 +02:00

16 lines
274 B
Perl

#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
if ($#ARGV != 0 || ! -d $ARGV[0]) {
say "Error with cleanup script: argument not provided or not a directory";
exit 1;
}
my $output_file = "$ARGV[0]/stat";
if (-f $output_file) {
unlink $output_file;
}