#!/bin/sh
#postscript-to-pdf:  a script for Velocity by Kyle Davis
#NOTE:  we use echo -en for things that go to Velocity to avoid a blank line in our context menus

version="1.5"
name="Convert to PDF"
authors="Kyle Davis"
about="This is a demo script for Velocity."
mimetypes="application/postscript"
dependancies="ps2pdf"
needterm="Yes"
multiplefiles=""
localonly="Yes"
case $1 in
	--get-info)
		echo -en "$version\n$name\n$authors\n$about\n$mimetypes\n$dependancies\n$needterm\n$multiplefiles\n$localonly"
		;;
	--execute)
		shift;windowx=$1
		shift;windowy=$1
		shift;windowwidth=$1
		shift;windowheight=$1
		shift;location=$1
		#start deps
		shift;dps2pdf=$1
		#end deps
		shift;file=$1
		shift;mimetype=$1
		cd "$location"
		$dps2pdf "$file"
		cd -
		;;
	*)
		echo "This should only be used by Velocity."
		;;
esac
