*** putegg.orig	Fri Jan  3 20:51:29 1997
--- putegg	Sat Feb 22 22:47:10 1997
***************
*** 1,56 ****
  #! /bin/sh
  #
  # script to copy vital files into another directory
  #
  
  if test "$1" = ""; then
    echo ""
!   echo "Usage: putegg <directory>"
    echo ""
    exit 1
  fi
  
  if test ! -d $1; then
    echo ""
    echo "Directory $1 is invalid."
    echo ""
    exit 1
  fi
  if test ! -r $1; then
    echo ""
    echo "You don't have permission there!"
    echo ""
    exit 1
  fi
  if test ! -w $1; then
    echo ""
    echo "You don't have permission there!"
    echo ""
    exit 1
  fi
  if test ! -x $1; then
    echo ""
    echo "You don't have permission there!"
    echo ""
    exit 1
  fi
  
! if test ! -r eggdrop; then
    echo ""
    echo "You must run 'putegg' from the eggdrop directory!"
    echo ""
  fi
  
  echo ""
! ./eggdrop -v
! echo "Copying eggdrop files into $1 ..."
! cp eggdrop* $1
! cp weed $1
! cp UPDATES $1
! cp README $1
! cp tcl-commands.doc $1
  cp tricks $1
  
  if test -r $1/help; then
    if test ! -d $1/help; then
      echo "$1/help is not a directory!  Skipping..."
--- 1,72 ----
  #! /bin/sh
  #
  # script to copy vital files into another directory
  #
+ if [ ! -f `basename ${0}` ] ; then
+     cd @datadir@/eggdrop
+ fi
  
  if test "$1" = ""; then
    echo ""
!   echo "Usage: putegg <bot-directory>"
    echo ""
    exit 1
  fi
  
+ if test ! -e $1; then
+   echo ""
+   echo "mkdir $1"
+   mkdir $1
+ fi
+ 
  if test ! -d $1; then
    echo ""
    echo "Directory $1 is invalid."
    echo ""
    exit 1
  fi
  if test ! -r $1; then
    echo ""
    echo "You don't have permission there!"
+   echo '('$1')'
    echo ""
    exit 1
  fi
  if test ! -w $1; then
    echo ""
    echo "You don't have permission there!"
+   echo '('$1')'
    echo ""
    exit 1
  fi
  if test ! -x $1; then
    echo ""
    echo "You don't have permission there!"
+   echo '('$1')'
    echo ""
    exit 1
  fi
  
! if test ! -r `basename ${0}; then
    echo ""
    echo "You must run 'putegg' from the eggdrop directory!"
    echo ""
  fi
  
  echo ""
! @bindir@/eggdrop -v
! echo "Copying/linking eggdrop files into $1 ..."
! cp FBSDbot $1/
! ln README $1/
! ln UPDATES $1/
! cp botchk $1/
! ln botchk.orig $1/
! ln eggdrop.doc $1/
! cp lamestbot $1/
! ln nets.list $1/
! ln tcl-commands.doc $1/
  cp tricks $1
  
  if test -r $1/help; then
    if test ! -d $1/help; then
      echo "$1/help is not a directory!  Skipping..."
***************
*** 62,95 ****
      echo "written should be safe."
      echo -n "   Overwrite the old help files? (y/n) "
      read ans
      echo ""
      if test "$ans" = "y"; then
!       echo "Copying help files ..."
!       cp help/* $1/help
      else
        echo "Okay, skipping help files ..."
      fi
    fi
  else
!   echo "Creating help directory and copying help files ..."
    mkdir $1/help
!   cp help/* $1/help
  fi
  
  if test -r $1/text; then
    if test ! -d $1/text; then
      echo "$1/text is not a directory!  Skipping..."
    else 
      echo "Skipping text directory because you already have one ..."
    fi
  else
!   echo "Creating text directory and copying those files ..."
    mkdir $1/text
!   cp text/* $1/text
    if test ! -r $1/motd; then
!     cp motd $1
    fi
  fi
  
  if test -r $1/dcc; then
    if test ! -d $1/dcc; then
--- 78,112 ----
      echo "written should be safe."
      echo -n "   Overwrite the old help files? (y/n) "
      read ans
      echo ""
      if test "$ans" = "y"; then
!       echo "Linking help files ..."
!       rm -f $1/help/*
!       ln help/* $1/help/
      else
        echo "Okay, skipping help files ..."
      fi
    fi
  else
!   echo "Creating help directory and linking help files ..."
    mkdir $1/help
!   ln help/* $1/help/
  fi
  
  if test -r $1/text; then
    if test ! -d $1/text; then
      echo "$1/text is not a directory!  Skipping..."
    else 
      echo "Skipping text directory because you already have one ..."
    fi
  else
!   echo "Creating text directory and copying/linking those files ..."
    mkdir $1/text
!   ln text/* $1/text/
    if test ! -r $1/motd; then
!     cp motd $1/
    fi
  fi
  
  if test -r $1/dcc; then
    if test ! -d $1/dcc; then
***************
*** 105,125 ****
    if test ! -d $1/scripts; then
      echo "$1/scripts is not a directory!  Skipping..."
    else
      echo "Updating the scripts that come with eggdrop ..."
      echo "   (If you modify these, be sure to use different names.)"
!     cp scripts/* $1/scripts
    fi
  else
    echo "Creating scripts directory ..."
    mkdir $1/scripts
!   cp scripts/* $1/scripts
  fi
  
  echo ""
  echo "Okay, copied the important stuff."
  echo "If you haven't read the README file, then READ IT NOW!!!"
- echo "If you're just upgrading, then you can safely erase this directory."
- echo "Otherwise, you should probably keep it around for reference for a"
- echo "little while."
  echo ""
! 
--- 122,147 ----
    if test ! -d $1/scripts; then
      echo "$1/scripts is not a directory!  Skipping..."
    else
      echo "Updating the scripts that come with eggdrop ..."
      echo "   (If you modify these, be sure to use different names.)"
!     for s in scripts/* ; do
!        if [ -f $1/scripts/`basename $s` ] ; then
!           rm -f $1/scripts/`basename $s`
!        fi
!     done
!     ln scripts/* $1/scripts/
    fi
  else
    echo "Creating scripts directory ..."
+   echo "   (If you modify these, be sure to use new names.)"
    mkdir $1/scripts
!   ln scripts/* $1/scripts/
  fi
  
  echo ""
  echo "Okay, copied the important stuff."
  echo "If you haven't read the README file, then READ IT NOW!!!"
  echo ""
! echo "Copy FBSDbot or lamestbot to a script named for your bot"
! echo "modify it according to the contained comments, and you're"
! echo "ready to use it."
