#!/bin/bash

# This program is part of the tbackup package,
# (c) 1993,1994,1995,1998 Koen Holtman.
#
# The tbackup package is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free Software Foundation.
# No warranty. See the GNU General Public License for more details.

export bupbin=/usr/lib/tbackup/bin
export bupdir=/usr/lib/tbackup
export PATH=$bupbin\:$PATH
export ttytitle=guess

source tinit

#get method names and parameters
source getguesspars

#add name and date to descr file
echo "Made with tbackup ($version)" >>descr
printf "by %s@%s, on " `whoami` `hostname` >>descr
date >>descr

source makelogtty

source handlepars

echo
echo Guess description:
gawk '{ print "     " $0; }' descr
if [ $makeindexfile = y ]; then
 echo "Guess index file is $indexfilename."
fi

echo
echo "Guess in progress..."
echo

# make named pipes

mkfifo -m 700 choice


# execute guess
# choosemethod and packmethod are supposed to start background tasks.
# writemethod should return if the archive is written.

cd /tmp/tbup
source $choosemethod\.cx

source doguess


#do not finalise choose method here.

source texit

