#! /bin/sh
###########################################################################
# LinPac - packet radio terminal for Linux
# (c) 1999 Radek Burget <xburge01@stud.fee.vutbr.cz>
#
# This script provides the user interface for pack.pl
#
# Usage: delmsg <message_number>
###########################################################################

#lpapi should be in PATH when LinPac is running
LPAPI="lpapi"

#Test if LinPac is running
$LPAPI 0
if [ ! $? -eq 0 ]; then
  echo LinPac is not running
  exit 1
fi

#Get the home BBS address
HOMEADDR=`$LPAPI 0 get HOME_ADDR`

#Get the callsign
TTT=`echo $HOMEADDR | tr "." ","`
CALL=`echo $TTT | sed s/,.*//`

#Call pack.pl
pack.pl $CALL
exit $?
