Updated scripts installation

This commit is contained in:
Michiel Broek
2004-01-21 20:32:00 +00:00
parent 90bd770f9b
commit f24c946130
10 changed files with 152 additions and 26 deletions

View File

@@ -19,24 +19,39 @@ install:
echo; echo " Must be root to install!"; echo; exit 3; \
fi
@if [ ! -x ${ETCDIR}/maint ]; then \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 maint ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 maint ${ETCDIR}" ; \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 maint ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 maint ${ETCDIR}" ; \
else \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 maint ${ETCDIR}/maint.new ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 maint ${ETCDIR}/maint.new" ; \
fi
@if [ ! -x ${ETCDIR}/midnight ]; then \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 midnight ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 midnight ${ETCDIR}" ; \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 midnight ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 midnight ${ETCDIR}" ; \
else \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 midnight ${ETCDIR}/midnight.new ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 midnight ${ETCDIR}/midnight.new" ; \
fi
@if [ ! -x ${ETCDIR}/weekly ]; then \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 weekly ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 weekly ${ETCDIR}" ; \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 weekly ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 weekly ${ETCDIR}" ; \
else \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 weekly ${ETCDIR}/weekly.new ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 weekly ${ETCDIR}/weekly.new" ; \
fi
@if [ ! -x ${ETCDIR}/monthly ]; then \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 monthly ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0711 monthly ${ETCDIR}" ; \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 monthly ${ETCDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 monthly ${ETCDIR}" ; \
else \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 monthly ${ETCDIR}/monthly.new ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 monthly ${ETCDIR}/monthly.new" ; \
fi
@if [ ! -x ${BINDIR}/hatch ]; then \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 hatch ${BINDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 hatch ${BINDIR}" ; \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 hatch ${BINDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0744 hatch ${BINDIR}" ; \
else \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 hatch ${BINDIR}/hatch.new ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 hatch ${BINDIR}/hatch/new" ; \
fi
@if [ -x ${JOEBIN}/joe ]; then \
echo "Installing support for joe editor" ; \
@@ -60,6 +75,11 @@ install:
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 bbsdoor.sh ${BINDIR}" ; \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 rundoor.sh ${BINDIR} ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0755 rundoor.sh ${BINDIR}" ; \
else \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 bbsdoor.sh ${BINDIR}/bbsdoor.sh.new ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 bbsdoor.sh ${BINDIR}/bbsdoor.sh.new" ; \
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 rundoor.sh ${BINDIR}/rundoor.sh.new ; \
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 rundoor.sh ${BINDIR}/rundoor.sh.new" ; \
fi
@bash ./installinit.sh

View File

@@ -5,7 +5,7 @@
# Hatch script for MBSE BBS.
#
#============================================================================
# Copyright (C) 1997-2002
# Copyright (C) 1997-2004
#
# Michiel Broek FIDO: 2:280/2802
# Beekmansbos 10
@@ -31,11 +31,11 @@
#
# Global settings, change as needed:
#
# Password, see menu 1.13.2
# Password, see menu 1.10.2
#
HATCHPWD="DizIzMyBIGseeKret"
INBOUND=$MBSE_ROOT/var/inbound
HVERSION="1.0.1"
HVERSION="1.0.2"
if [ "`id -un`" != "mbse" ]; then
@@ -43,6 +43,11 @@ if [ "`id -un`" != "mbse" ]; then
exit 1
fi
if [ "DizIzMyBIGseeKret" == "${HATCHPWD}" ]; then
echo "This script is not yet configured, first edit this script before use!"
exit 1
fi
cat <<EOF
Hatch files for MBSE BBS. All files you want to hatch must be
@@ -79,13 +84,13 @@ do
echo -e "Enter description for $f (empty is skip file)"
echo -n ": "
read DESC
echo -e "Replace filename (empty is none)"
echo -n ": "
read REPL
echo -e "Magic filename (empty is no magic)"
echo -n ": "
read MAGIC
if [ ! -z "$DESC" ]; then
echo -e "Replace filename (empty is none)"
echo -n ": "
read REPL
echo -e "Magic filename (empty is no magic)"
echo -n ": "
read MAGIC
let i=i+1
FILE=$INBOUND/`$MBSE_ROOT/bin/mbseq`.tic
echo "Hatch" > $FILE