#!/bin/csh -f
#
# unpacksa username machine destinationdir
#
# runs unpksa as specified user

set path = ($path /usr/ucb)

if (-x /bin/su ) then
  set suer = /bin/su
endif
if (-x /usr/bin/su ) then
  set suer = /usr/bin/su
endif
if (! $?suer )  then
  echo Cannot find program su in /bin or /usr/bin
endif

set caller = `whoami`

if ( $1 == $caller ) then
  ../generic/unpksa $2 $3
else
  $suer $1 -c "../generic/unpksa $2 $3"
endif

