#!/bin/sh
# Usage: soup [ upload ] 
# Process reply packet if requested
if [ $# -gt 0 ]
then
  if [ $1 = "upload" ]
  then
    echo start your upload of yourbbs.rep now!
    rz
    unzip -U yourbbs.rep
    uqwk -m -n +L -RREPLIES
    rm yourbbs.rep
  fi
fi

# Check for an existing packet
if [ -f "yourbbs.zip" ]
then
  echo Warning - found an unsent yourbbs.zip file!
  sz -u yourbbs.zip
fi

# Copy your newsgroups file to a backup directory as a precation
cp .newsrc backup

# Collect your unread mail and news in SOUP format
# Change -B8000 to -B0 for no limit on packet size
uqwk +m +n -z +L -B8000

# Zip it up, and delete files if successful
zip -m yourbbs AREAS *.MSG

# Download it to your PC
sz -u yourbbs.zip
