# first see if xzip is available on this machine, if
# so then run it otherwise show an image
if test ! -f ${IFE_HOME}/sys/bin/xzip
then
      echo    "emulation	xzip	${IFE_HOME}/lib/images/xzip_image.xwd"
      xwud -in ${IFE_HOME}/lib/images/xzip_image.xwd
      echo    "zip_complete	finished"
      exit 0
fi

mkdir /tmp/$$xzip
cd /tmp/$$xzip
${IFE_HOME}/sys/bin/xzip
# look for files with particular extensions
# if exist then post to the data_exchange and signal finish
native=`ls *.zip`
viewer=`ls *.vew`
all='none'
if [ ! Y$native = Y ]
then
	echo	"zip_complete	zip	zip	/tmp/$$xzip/$native"
	all='some'
fi
if [ ! Z$viewer = Z ]
then
	echo	"zip_complete	zip	viewer	/tmp/$$xzip/$viewer"
	all='some'
fi

# if no zip or viewer files found then assume no files.
if [ $all = 'none' ]
then
	echo	"zip_aborted	no_files"
fi
