install.sh 929 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. #source var/function
  3. . ./function.sh
  4. check_inst_right
  5. check_files
  6. read -p "WARNING: This target dis experimental. Press Ctrl+C to cancel or Enter to continue." readEnterKey
  7. mkdir -p $PKG_PATH/bin/
  8. mkdir -p $PKG_PATH/etc/$PKG/
  9. mkdir -p $PKG_PATH/var/$PKG/
  10. #we copy all file into opt/ dir and treat dir like normal unix arborescence
  11. rsync -r --exclude .svn db/ $PKG_PATH/var/$PKG/db
  12. rsync -r --exclude .svn log/ $PKG_PATH/var/$PKG/log
  13. rsync -r --exclude .svn conf/ $PKG_PATH/etc/$PKG/conf
  14. rsync -r --exclude .svn npc/ $PKG_PATH/npc
  15. cp athena-start $PKG_PATH/
  16. mv *-server* $PKG_PATH/bin/
  17. ln -fs $PKG_PATH/var/$PKG/db/ $PKG_PATH/db
  18. ln -fs $PKG_PATH/var/$PKG/log/ $PKG_PATH/log
  19. ln -fs $PKG_PATH/etc/$PKG/conf/ $PKG_PATH/conf
  20. ln -fs $PKG_PATH/athena-start /usr/bin/$PKG
  21. for f in $(ls $PKG_PATH/bin/) ; do ln -fs $PKG_PATH/bin/$f $PKG_PATH/$f; done
  22. echo "Installation is done you can now control server with '$PKG start'"