#! /bin/sh
echo -n "Enter the address of the port that you want to use [0x3bc] "
read PORT
echo -n "#define PORT " > config.h
if [ -z "$PORT" ];
then
  PORT=0x3bc
fi
echo $PORT >> config.h
echo -n "Enter the value that should be written to $PORT for ON [1] "
read ON
echo -n "#define ON " >> config.h
if [ -z "$ON" ];
then
  ON=1
fi
echo $ON >> config.h
echo -n "Enter then value that should be written to $PORT for OFF [0] "
read OFF
echo -n "#define OFF " >> config.h
if [ -z "$OFF" ];
then
  OFF=0
fi
echo $OFF >> config.h
if [ "$ON" = "$OFF" ];
then
  echo "Sorry, but this configuration is useless. Exiting."
  exit 1
fi
echo Configured for port $PORT, with $ON for ON and $OFF for OFF.
echo Now do a 'make' or 'make light' for just getting the executable,
echo or run 'make install' to get light installed.
