; $VER: Newlist 8.2 (25-Sep-93) Manual Install Script
echo ""
echo " -------------------"
echo "  Install newlist8.2"
echo " -------------------"
echo ""
echo ""
if exists c:nl
      echo ""
      echo " ATTENTION:  c:nl already exists!"
      ask  "             Do you wish to overwrite c:nl (y/n)?"
      if warn
      else
         echo ""
         echo "Installation aborted."  
         skip xit
      endif
      c:nl -K >nil: <nil:
      resident c:nl remove >nil:
      echo ""
      echo ""
endif

echo " Which Newlist version:"
echo ""
echo "    Newlist82     - Newlist for all Amigas"
echo "    Newlist82.030 - Newlist for MC68030 or MC68040 CPUs only"
echo ""
ask " Install Newlist82 (y/n) ?"
if warn 
   copy newlist82 to c:nl
   echo "      Newlist82 copied to c:nl..."
   resident c:nl add <nil: >nil:
   skip ok
endif
ask " Install Newlist82.030 (y/n) ?"
if warn 
   copy newlist82.030 to c:nl
   echo "      Newlist82.030 copied to c:nl..."
   resident c:nl add <nil: >nil:
endif

lab ok
   cd s
if exists S:NEWLIST.config
      echo ""
      echo " ATTENTION!"
      echo " Config file S:NEWLIST.config already exists!!"
      echo ""
      ask " Want to replace S:NEWLIST.config (y/n) ?"
      if warn
      else 
         skip more
      endif
endif
   echo ""
   echo " Please install a config for your language...."
   echo ""
   echo " Languages available:"
   echo "   Danish   Dutch    Elite  English  Finnish"
   echo "   French   Italian  Polish Swedish  Norsk"
   echo ""
   ask " Install Danish (y/n) ?"
   if warn
      copy NEWLIST.config.danish S:NEWLIST.config
      skip good
   endif
   ask " Install Dutch (y/n) ?"
   if warn
      copy NEWLIST.config.dutch S:NEWLIST.config
      skip good
   endif
   ask " Install Elite (y/n) ?"
   if warn
      copy NEWLIST.config.elite S:NEWLIST.config
      skip good
   endif
   ask " Install English (y/n) ?"
   if warn
      copy NEWLIST.config.english S:NEWLIST.config
      skip good
   endif
   ask " Install Finnish (y/n) ?"
   if warn
      copy NEWLIST.config.finnish S:NEWLIST.config
      skip good
   endif
   ask " Install French (y/n) ?"
   if warn
      copy NEWLIST.config.french S:NEWLIST.config
      skip good
   endif
   ask " Install Italian (y/n) ?"
   if warn
      copy NEWLIST.config.italian S:NEWLIST.config
      skip good
   endif
   ask " Install Polish (y/n) ?"
   if warn
      copy NEWLIST.config.polish S:NEWLIST.config
      skip good
   endif
   ask " Install Swedish (y/n) ?"
   if warn
      copy NEWLIST.config.swedish S:NEWLIST.config
      skip good
   endif
   ask " Install Norsk (y/n) ?"
   if warn
      copy NEWLIST.config.norsk S:NEWLIST.config
      skip good
   endif

   echo " You forgot to install a config...please rerun and install one"
   skip more

lab good
echo " File copied...ok"

lab more
cd /
echo ""
echo " -------------------"
echo "  Misc stuff to add"
echo " -------------------"
echo ""
echo " 'Aliases'   a bunch of useful aliases that use newlist's features."
echo "               Newlist_Aliases will be copied to s:"
echo "               Editing this file is encouraged."
echo " 'NewSpat'   a replacement for Commodore's s:spat that uses nl"
echo " 'NewDpat'   a replacement for Commodore's s:dpat that uses nl"
echo " 'newdir'    a neat newlist multi-execution example"
echo ""
ask " Shall I append 'Aliases' to your s:shell-startup (y/n) ?"
if warn 
   copy scripts/Aliases s:Newlist_Aliases
   echo "execute s:Newlist_Aliases" >>s:shell-startup
endif
ask " Shall I replace s:spat and s:dpat with newlist versions (y/n)?"
if warn
   echo "  --Original spat and dpat will be renamed to spat.bak and dpat.bak"
   if exists s:spat
      rename s:spat s:spat.bak
   endif
   if exists s:dpat
      rename s:dpat s:dpat.bak
   endif
   copy scripts/newspat s:spat
   copy scripts/newdpat s:dpat
endif
ask " Shall I copy 'newdir' to your c: directory (y/n)?"
if warn
   copy scripts/newdir c:
endif
echo ""
echo " --------"
echo "  Extras"
echo " --------"
echo ""
echo "  RESIDENT   -  loads the program once into memory so further calls"
echo "                  do not need to be loaded again from disk."
echo "                  This makes newlist fast to run."
echo ""
ask " Shall I add 'RESIDENT c:nl PURE ADD' to your s:user-startup ?"
if warn
   if exists s:user-startup
         echo "RESIDENT c:nl PURE ADD" >>s:user-startup
   endif
endif
echo ""
echo ""
echo " Installation complete.  If you have any problems, consult the"
echo "   installation section in NewList.doc.  If you installed the aliases"
echo "   please edit them to increase shell-startup speed."
echo ""
echo " You should edit the S:NEWLIST.config file to your preferences now."
echo ""
echo "           Try it out with:   nl"
echo "                              nl -z"
echo "                              nl -q"
echo "                              nl -qs"
echo "                              nl -qt"
echo "                              nl -T3"
echo "                              nl -UV"
echo "                              nl -?"
echo ""
echo " Enjoy!"
lab xit
echo ""
