aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/test610.pl
blob: 5d7c1f6aa051f6594fe830102e9436a59fb7abbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl
# Create and remove directories and check their existence
if ( $#ARGV != 1 ) 
{
	print "Usage: $0 mkdir|rmdir|gone path\n";
	exit 1;
}
if ($ARGV[0] eq "mkdir")
{
	mkdir $ARGV[1] || die "$!";
	exit 0;
}
elsif ($ARGV[0] eq "rmdir")
{
	rmdir $ARGV[1] || die "$!";
	exit 0;
}
elsif ($ARGV[0] eq "gone")
{
	! -e $ARGV[1] || die "Path $ARGV[1] exists";
	exit 0;
}
print "Unsupported command $ARGV[0]\n";
exit 1;