This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/script/hatch

116 lines
3.1 KiB
Plaintext
Raw Normal View History

2002-02-23 20:28:36 +00:00
#!/bin/sh
#
# $Id$
#
# Hatch script for MBSE BBS.
#
#============================================================================
# Copyright (C) 1997-2002
#
# Michiel Broek FIDO: 2:280/2802
# Beekmansbos 10
# 1971 BV IJmuiden
# the Netherlands
#
# This file is part of MBSE BBS.
#
# This BBS is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# MBSE BBS is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MBSE BBS; see the file COPYING. If not, write to the Free
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#============================================================================
#
# Global settings, change as needed:
#
# Password, see menu 1.13.2
#
HATCHPWD="DizIzMyBIGseeKret"
INBOUND=$MBSE_ROOT/var/inbound
2002-10-28 13:57:38 +00:00
HVERSION="1.0.1"
2002-02-23 20:28:36 +00:00
if [ "`id -un`" != "mbse" ]; then
echo "This program may only be used by user 'mbse'"
exit 1
fi
cat <<EOF
Hatch files for MBSE BBS. All files you want to hatch must be
in the current directory and must be owned by user 'mbse' and
group 'bbs'. They will be removed when they are hatched, so
this should be a temporary copy of all those files.
These files must be real files, no symlinks.
Long filenames are allowed as long as there are no spaces in
the filename. The mbfido program will build the 8.3 filenames
when needed.
When hatching long filenames and downlinks complain about this,
then with mbsetup set these nodes to 8.3 names.
2002-02-23 20:28:36 +00:00
EOF
echo -n "Enter TIC group to hatch files in (Control-C = stop) : "
2002-02-23 20:28:36 +00:00
read GROUP
if [ -z "$GROUP" ]; then
exit 0
fi
echo -n "Enter the Fidonet aka for this TIC group, ie. 2:280/2802 : "
2002-02-23 20:28:36 +00:00
read AKA
if [ -z "$AKA" ]; then
exit 0
fi
2002-02-23 20:28:36 +00:00
echo -e "Now scanning directory, add a oneline description for each file\n"
i=0;
for f in `ls`
do
if [ -f $f ]; then
echo -e "Enter description for $f (empty is skip file)"
echo -n ": "
read DESC
2002-10-28 13:57:38 +00:00
echo -e "Replace filename (empty is none)"
echo -n ": "
read REPL
echo -n "Magic filename (empty is no magic)"
echo -n ": "
read MAGIC
2002-02-23 20:28:36 +00:00
if [ ! -z "$DESC" ]; then
let i=i+1
FILE=$INBOUND/`$MBSE_ROOT/bin/mbseq`.tic
echo "Hatch" > $FILE
2002-10-28 13:57:38 +00:00
echo "Created MBSE BBS hatch script v$HVERSION" >> $FILE
2002-02-23 20:28:36 +00:00
echo "Area $GROUP" >> $FILE
2002-10-28 13:57:38 +00:00
if [ ! -z "$REPL" ]; then
echo "Replaces $REPL" >> $FILE
fi
if [ ! -z "$MAGIC" ]; then
echo "Magic $MAGIC" >> $FILE
fi
2002-02-23 20:28:36 +00:00
echo "Origin $AKA" >> $FILE
echo "From $AKA" >> $FILE
echo "Fullname $f" >> $FILE
echo "Pth `pwd`" >> $FILE
echo "Desc $DESC" >> $FILE
echo "Pw $HATCHPWD" >> $FILE
echo -e "\nFile hatched\n"
fi
fi
done
echo -e "\nTotal $i files hatched in area $GROUP."
echo "Start processing TIC files"
$MBSE_ROOT/bin/mbfido tic