#!/bin/sh
# $poplocal/local/com/mkbhamtar
# Create tar file with Birmingham local extensions
# Creates $local/bham.tar.gz and copies it to FTP directory
# Aaron Sloman
## 1 Jan 2005
## added
##     auto/read_lists_in_file.p
##     help/read_lists_in_file
##     help/pattern_instance
##     help/semnet
##     lib/semnet.p
## removed (moved into main linux poplog system)
##     auto/vedjoinline.p
##
##
## 25 Jul 2004
## added
##      auto/findcite.p             help/findcite
##
## 17 Apr 2004
## added
##      auto/getmail.p              auto/ved_nm.p
##      auto/lastmail.p             auto/ved_prevmail.p
##      auto/popsitename.p          auto/ved_purgemail.p
##      auto/sysgetmailname.p       auto/ved_rrr.p
##      auto/ved_alias.p            auto/ved_seen.p
##      auto/ved_ccm.p              auto/ved_send.p
##      auto/ved_cleanmail.p        auto/ved_tah.p
##      auto/ved_checkmail.p        auto/ved_tmh.p
##      auto/ved_getmail.p          auto/ved_vm.p
##      auto/ved_gm.p               auto/ved_wappcm.p
##      auto/ved_grepmail.p         auto/vedatmailstart.p
##      auto/ved_lastmail.p         auto/vedskipheaders.p
##      auto/ved_lm.p               help/mail
##      auto/ved_mcm.p              help/mailrc
##      auto/ved_mdir.p             help/ved_alias
##      auto/ved_mergemail.p        help/ved_getmail
##      auto/ved_mmi.p              help/ved_mail
##      auto/ved_mmo.p              help/ved_tmh
##      auto/ved_nextmail.p


## 7 Mar 2004
#    extended to include ved_attach, help file, and mime-related stuff

##
# 3 Apr 2002
# 10 Feb 2003 added ved_aspell.p and help file
# 27 Jul 2002 added ved_bash.p, ved_tcsh.p, vedgenshell.p
# 30 Oct 2003 removed xtermkeys (Put back 22 Nov 2003, temporarily)


echo "removing existing compressed version"
ls -l $poplocal/local/ftp/bham.tar.gz
rm -f $poplocal/local/ftp/bham.tar.gz

echo 'creating compressed tar file $poplocal/local/ftp/bham.tar.gz'

## needs modified version of pipein.p for linux

cd $local

cp -p $local/ftp/copyright.html COPYRIGHT.html

rm -f AATARFILE*
touch "AATARFILE`date +%F`"



tar cf - \
    AATAR* \
    COPYRIGHT.html \
    auto/ARGS.p \
    auto/Veddebug.p \
    auto/XptDefaultScreen.p \
    auto/Xved.p \
    auto/\!.p \
    auto/ask_xved.p \
    auto/compilehere.p \
    auto/concat_strings.p \
    auto/datafile.p \
    auto/doesmatch.p \
    auto/findcite.p  \
    auto/forall_match.p \
    auto/forevery.p \
    auto/forevery.p \
    auto/get_answer.p \
    auto/get_command_output.p \
    auto/getmail.p \
    auto/gomem.p \
    auto/gomems.p \
    auto/haiku.p \
    auto/hasstartstringin.p \
    auto/issymlink.p \
    auto/lastmail.p \
    auto/mimedecode.p \
    auto/mimencode.p \
    auto/pattern_instance.p \
    auto/pipein.p \
    auto/popindex.p \
    auto/popsitename.p \
    auto/print_file.p \
    auto/rc_background.p \
    auto/rc_circle.p \
    auto/rc_destroy.p \
    auto/rc_foreground.p \
    auto/rc_mouse_coords.p \
    auto/rc_showtree.p \
    auto/rc_title.p \
    auto/rc_window_coords.p \
    auto/rc_window_dimensions.p \
    auto/read_lists_in_file.p \
    auto/readin_shell_output.p \
    auto/storedata.p \
    auto/sys_host_type.p \
    auto/sys_obey_linerep.p \
    auto/sys_popen.p \
    auto/sysgetmailname.p \
    auto/type.p \
    auto/ved_Respond.p \
    auto/ved_addblock.p \
    auto/ved_addline.p \
    auto/ved_alias.p \
    auto/ved_arrows.p \
    auto/ved_aspell.p \
    auto/ved_attach.p \
    auto/ved_autosave.p \
    auto/ved_backspace.p \
    auto/ved_bash.p \
    auto/ved_bg.p \
    auto/ved_browse.p \
    auto/ved_bss.p \
    auto/ved_bss.p \
    auto/ved_bssp.p \
    auto/ved_bww.p \
    auto/ved_bww.p \
    auto/ved_bwwp.p \
    auto/ved_calc.p \
    auto/ved_ccm.p \
    auto/ved_cdiff.p \
    auto/ved_checkmail.p \
    auto/ved_cleanmail.p \
    auto/ved_cleanup.p \
    auto/ved_clock.p \
    auto/ved_day.p \
    auto/ved_debug.p \
    auto/ved_decode.p \
    auto/ved_deletefile.p \
    auto/ved_detabmr.p \
    auto/ved_dounix.p \
    auto/ved_fileheader.p \
    auto/ved_getit.p \
    auto/ved_getlib.p \
    auto/ved_getmail.p \
    auto/ved_getvars.p \
    auto/ved_gg.p \
    auto/ved_gli.p \
    auto/ved_gm.p \
    auto/ved_gomem.p \
    auto/ved_gomems.p \
    auto/ved_gp.p \
    auto/ved_grep.p \
    auto/ved_grepmail.p \
    auto/ved_headers.p \
    auto/ved_inkeys.p \
    auto/ved_ins.p \
    auto/ved_ispell.p \
    auto/ved_keymap.p \
    auto/ved_lastmail.p \
    auto/ved_lm.p \
    auto/ved_loadline.p \
    auto/ved_ltl.p \
    auto/ved_mcm.p \
    auto/ved_mdir.p \
    auto/ved_mem.p \
    auto/ved_mems.p \
    auto/ved_menu.p \
    auto/ved_mergemail.p \
    auto/ved_mmi.p \
    auto/ved_mmo.p \
    auto/ved_nextcsame.p \
    auto/ved_nextmail.p \
    auto/ved_nm.p \
    auto/ved_prevmail.p \
    auto/ved_procheader.p \
    auto/ved_psprint.p \
    auto/ved_psprintmr.p \
    auto/ved_purgefiles.p \
    auto/ved_purgemail.p \
    auto/ved_readmime.p \
    auto/ved_reply.p \
    auto/ved_resetvars.p \
    auto/ved_respond.p \
    auto/ved_rrr.p \
    auto/ved_seen.p \
    auto/ved_send.p \
    auto/ved_setwindow.p \
    auto/ved_sgsr.p \
    auto/ved_sortmr.p \
    auto/ved_ss.p \
    auto/ved_ssp.p \
    auto/ved_tah.p \
    auto/ved_tcsh.p \
    auto/ved_tli.p \
    auto/ved_tlli.p \
    auto/ved_tlo.p \
    auto/ved_tmh.p \
    auto/ved_trans.p \
    auto/ved_unix.p \
    auto/ved_vm.p \
    auto/ved_vman.p \
    auto/ved_wappcm.p \
    auto/ved_writeable.p \
    auto/ved_writemime.p \
    auto/ved_ww.p \
    auto/ved_ww.p \
    auto/ved_wwp.p \
    auto/vedatmailstart.p \
    auto/veddiscout.p \
    auto/vedfilecomplete.p \
    auto/vedgenshell.p \
    auto/vedlastitem.p \
    auto/vedsetwindow.p \
    auto/vedskipheaders.p \
    auto/vedsuntype5.p \
    auto/vedsunxtermkeys.p \
    auto/vedxtermkeys.p \
    auto/which_values.p \
    auto/while_matching.p \
    auto/xplatform.p \
    com \
    help/ARGS \
    help/XptDeferApply \
    help/arrayfile \
    help/bye \
    help/cdiff \
    help/compilehere \
    help/concat_strings \
    help/define \
    help/doesmatch \
    help/dounix \
    help/exit \
    help/findcite \
    help/get_command_output \
    help/go \
    help/inorout \
    help/linux.poplog \
    help/mail \
    help/mailrc \
    help/ncdxtermkeys \
    help/pattern_instance \
    help/rc_background \
    help/rc_circle \
    help/rc_linepic \
    help/rc_mouse_coords \
    help/rc_swap_context \
    help/rc_window_coords \
    help/rc_window_dimensions \
    help/read_lists_in_file \
    help/readin_shell_output \
    help/readpattern \
    help/revisepop \
    help/run.background \
    help/shell \
    help/semnet \
    help/summarise \
    help/type \
    help/unix.commands \
    help/ved_alias \
    help/ved_arrows \
    help/ved_aspell \
    help/ved_attach \
    help/ved_autosave \
    help/ved_bg \
    help/ved_browse \
    help/ved_calc \
    help/ved_cleanup \
    help/ved_day \
    help/ved_decode \
    help/ved_deletefile \
    help/ved_fileheader \
    help/ved_getit \
    help/ved_getmail \
    help/ved_grep \
    help/ved_headers \
    help/ved_ispell \
    help/ved_lockfile \
    help/ved_mail \
    help/ved_mli \
    help/ved_mlo \
    help/ved_procheader \
    help/ved_psprint \
    help/ved_purgefiles \
    help/ved_resetvars \
    help/ved_respond \
    help/ved_sortmr \
    help/ved_ss \
    help/ved_tli \
    help/ved_tlli \
    help/ved_tlo \
    help/ved_tmh \
    help/ved_unix \
    help/ved_vman \
    help/vedmemfile \
    help/vedncdxtermkeys \
    help/which_values \
    help/window_dimensions \
    help/xplatform \
    lib/advent_objectclass.p \
    lib/arrayfile.p \
    lib/brait.p \
    lib/buildindex.p \
    lib/connect4.p \
    lib/elizaprog.p \
    lib/emacsreadline.p \
    lib/eshell.p \
    lib/fixvedhelp.p \
    lib/ga.p \
    lib/generate_category.p \
    lib/go.p \
    lib/gramdemo.p \
    lib/gramdemo.p \
    lib/hangman.p \
    lib/logic.p \
    lib/mkind.p \
    lib/msblocks.p \
    lib/neural.p \
    lib/newdatafile.p \
    lib/newkit.p \
    lib/newmatches.p \
    lib/newpopvision.p \
    lib/newsolver.p \
    lib/newvederror.p \
    lib/oldkit.p \
    lib/oldvars.p \
    lib/poprulebase.p \
    lib/popvision.p \
    lib/prblib.p \
    lib/prwarning.p \
    lib/puilib.p \
    lib/rc_linepic.p \
    lib/rc_mousepic.p \
    lib/rc_poly.p \
    lib/rc_polydemo.p \
    lib/rc_swap_context.p \
    lib/rclib.p \
    lib/rcmenu.p \
    lib/rcmenulib.p \
    lib/readpattern.p \
    lib/rhino.p \
    lib/river.p \
    lib/river2.p \
    lib/routetree.p \
    lib/schema.p \
    lib/semnet.p \
    lib/sim_agent.p \
    lib/simkit.p \
    lib/simlib.p \
    lib/stripfile.p \
    lib/sublists.p \
    lib/summarise.p \
    lib/sun4keys.p \
    lib/sunrasterfile.p \
    lib/tparse.p \
    lib/ved_lockfile.p \
    lib/ved_status_menu.p \
    lib/vedscreendown.p \
    lib/vedscreendown.p \
    lib/vedsun4keys.p \
    lib/vedsun4xtermkeys.p \
    lib/vision.p \
    plog/lib/nip.pl \
    ref/doc_index \
    teach/Unix.intro \
    teach/advent_objectclass \
    teach/ai1project.checklist \
    teach/database \
    teach/datastructures \
    teach/diary \
    teach/email \
    teach/foreach \
    teach/ga \
    teach/ga_dejong.p \
    teach/gapex \
    teach/glossary \
    teach/grammar \
    teach/gstart \
    teach/id3 \
    teach/induce_rules.p \
    teach/matcharrow \
    teach/matchcollect \
    teach/matches \
    teach/mini.eliza \
    teach/netstart \
    teach/newsolver \
    teach/objectclass \
    teach/oop \
    teach/pictures \
    teach/pop11_project \
    teach/popcore \
    teach/primer \
    teach/progstyle \
    teach/projects \
    teach/proposals \
    teach/quickved \
    teach/random \
    teach/rc_demo \
    teach/rc_demo \
    teach/rc_linepic \
    teach/recursion \
    teach/reports \
    teach/respond \
    teach/revise \
    teach/river \
    teach/river2 \
    teach/river2.p \
    teach/riverchat \
    teach/searching \
    teach/sets \
    teach/sets.ans \
    teach/sets2 \
    teach/sets2.ans \
    teach/stack \
    teach/storygrammar \
    teach/teach \
    teach/telnetkeys \
    teach/tower \
    teach/unix.intro \
    teach/vars \
    teach/vars_and_lvars \
    teach/ved \
    teach/vednotes \
    teach/vedpop \
    teach/vedproc \
    teach/vedtips \
    teach/waltz \
    teach/waltz2 \
    rclib \
    rcmenu \
    setup \
    -C ved_latex auto lib help teach \
    | gzip > $poplocal/local/ftp/bham.tar.gz


echo 'created compressed tar file'

ls -l $poplocal/local/ftp/bham.tar.gz

cp -p $poplocal/local/com/mkbhamtar $poplocal/local/ftp/com/

rm -f COPYRIGHT
