.key WORD,PORTNAME/K,QUIET/S,FILES/M/K,ADD/S,REMOVE/S,ONLY/S,DATADIR/K,REQUESTER/S,REQSCREEN/K,REQTITLE/K,TO/K,ALL/S

; Expand -- use RExpand from shell (scripts)
; Written by Peter Liljenberg 1996

set rxc "rx REXX:Rexx_Expand.rexx"

if "<PORTNAME>" not eq ""
	set rxc $rxc <PORTNAME>
else
	set rxc $rxc REXPAND
endif

if "<QUIET>" not eq ""
	set rxc $rxc QUIET
else
	set rxc $rxc LOUD
endif

if "<WORD>" not eq ""
	set rxc $rxc EXPAND "<WORD>"
endif

if "<FILES>" not eq ""
	set rxc $rxc FILES <FILES>
endif

if "<ADD>" not eq ""
	set rxc $rxc ADD
endif

if "<REMOVE>" not eq ""
	set rxc $rxc REMOVE
endif

if "<ONLY>" not eq ""
	set rxc $rxc ONLY
endif

if "<DATADIR>" not eq ""
	set rxc $rxc DATADIR "<DATADIR>"
endif

if "<REQUESTER>" not eq ""
	set rxc $rxc REQUESTER
endif

if "<REQSCREEN>" not eq ""
	set rxc $rxc REQSCREEN "<REQSCREEN>"
endif

if "<REQTITLE>" not eq ""
	set rxc $rxc REQTITLE "<REQTITLE>"
endif

if "<TO>" not eq ""
	set rxc $rxc TO "<TO>"
endif

if "<ALL>" not eq ""
	set rxc $rxc ALL
endif

$rxc

unset rxc
