#!/usr/bin/perl 
# -*- Mode: Perl -*-
# 1. the Description line shows up in the Admin GUI
#    on the Robot | Crawl Settings -> Script to Launch menu
#
# description=touch /tmp/OnCompletionTest 
#

umask 022;

$nickname = `pwd`;
$nickname =~ s!.*/([^/]+)$!$1!;

@tmpdirs = ("/tmp","/temp", "~" ); # ugly
$tmpdir = "/tmp";		   # default 
foreach (@tmpdirs) {
    if (-e $_ and -w $_) {	# exists? writeable?
	$tmpdir = $_;
	last;
    }
}

system("/bin/touch /$tmpdir/onCompletionTest-$nickname");

exit;





