.K X
failat 25
echo "This checks the MusicWeb system to make sure the necessary"
echo "parts are present and correct.  It will correct what it can,"
echo "but makes NO changes to anything but the MusicWeb directories."
echo "(The checks are not exhaustive, but cover the most important things.)"
echo "...."
if not exists WEB_MASTER/Web
    echo "The main Web program itself is missing!"
    skip badsys
  endif
if not exists WEB_MASTER/Traveller
    echo "The Traveller program is missing!"
    skip badsys
  endif
if not exists WEB_MASTER/FileReq
    echo "The File Requester server is missing."
    echo "This will prevent modules from reading or writing many files,"
    echo "but the system itself will run..."
    wait 2
  endif
echo noline "The Web version you have is: "
version WEB_MASTER/Web version 2
if warn
    echo "This is not the latest version"
    echo "It will probably work, but may be lacking some features."
    wait 2
  endif
if not exists LIBS:ppipc.library
    echo "Couldn't find ppipc.library in LIBS:"
    if exists libs/ppipc.library
        echo "It is in the package, though...."
        echo "The Run_WEB script will add the local LIBS temporarily to"
        echo "the LIBS: path, so it is not vital to actually install it."
        echo "Use *`Install Libs' to place it permanently in LIBS:."
        wait 3
    else
        echo " -- in fact, it doesn't seem to be here at all!"
        skip badsys
      endif
  endif

;;; The script bit is quietly set, just in case...:
echo "I am going to set the script-bit on Run_WEB..."
protect >NIL: Run_WEB +s
if warn
    echo "Couldn't do that (write protected?) -- Hope it's OK..."
  endif

resident >NIL: WEB_Master/Traveller
if warn
    echo ""
    echo "The Traveller does not have the Pure bit set"
    echo "This would prevent it being made resident, and so"
    echo "no data would flow in the system!  I will fix this..."
    wait 3 ;;; just to make it look good (:-))
    protect WEB_Master/Traveller PRWED
    if not warn
        echo "Pure bit should now be set."
        wait
    else
        echo "Sonething's wrong -- couldn't set the Pure bit!"
        skip badsys
        endif
    endif
resident >NIL: Traveller remove

if not exists C/IPCQuit
    echo "Couldn't find *`IPCQuit'.  This will prevent proper shutdown."
    wait
    endif

if not exists End_Services
    echo "Couldn't find *`End_Services' script."
    echo "This will prevent proper shutdown."
    wait
    endif

echo ""

if not exists MODULES
    echo "The MODULES don't seem to be present!!"
    echo "You won't be able to do much!"
    wait
    endif

if not exists CONFIGURATIONS
    echo "The CONFIGURATIONS directory doesn't seem to be present!"
    wait
    endif

if not exists INSTRUMENTS
    echo "The INSTRUMENTS directory doesn't seem to be present!"
    wait
    endif

if not exists GUIDE
    echo "There desn't seem to be any manual! (GUIDE directory)!"
    wait
    endif

if not exists SEQS
    echo "The SEQS directory doesn't seem to be present."
    echo "This is empty anyway -- just a placeholder for *`Sequence' files"
    echo "but I might as well create it..."
    makedir SEQS
    wait
    endif

skip check2

lab badsys
echo "Severely Incomplete Package -- can't run..."
wait 5
quit

lab check2
echo ""
echo "Check complete..."
wait 3
