#!/bin/sh

if [ $# -lt 3 ]; then
  echo "usage $0 <user> <specfile> <host> [x=just init]"
  exit 1
fi

if [ $# = 4 ]; then
  http_post http://$3:7777/init.cgi ID=$1 passwd=$1 "spec=`cat $2`"
else
  http_post http://$3:7777/enter.cgi ID=$1 passwd=$1 "spec=`cat $2`"
fi
echo
