#!/bin/csh -f
#
# Shell script to update 've' data files.  Honors COUNTRY and
# PASSWORD variables if set, prompts if they are not.  Usage
# is 'refresh', from within your empire data directory.  Assumes
# realm #0 includes your entire country.
#
if (! $?COUNTRY) then
    echo -n "Country: "
    setenv COUNTRY $<
endif
#
if (! $?PASSWORD) then
    echo -n "Password: "
    stty -echo
    setenv PASSWORD $<
    stty echo
endif
#
echo "map" >! mapout
echo "cen" >! cenout
echo "com" >! comout
echo "ship" >! shipout
echo "plane" >! planeout
empire $COUNTRY << EOI
$PASSWORD
map #0 >> mapout
cen #0 >> cenout
com #0 >> comout
ship >> shipout
plane >> planeout
quit
EOI
