publish.sh 953 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. SHELL_DIR=$(cd "$(dirname "$0")"; pwd)
  2. pushd ${SHELL_DIR}
  3. source ./config.sh
  4. if [ -d ${TARGET_ROOT} ]; then
  5. rm -rf ${TARGET_ROOT}
  6. fi
  7. mkdir -p ${TARGET_ROOT}
  8. #check the environment
  9. ./toolsForPublish/checkEnvironment.sh
  10. source ./toolsForPublish/environment.sh
  11. # output the number of plugins
  12. if [ $1 ]; then
  13. plugins=(${1//:/ })
  14. else
  15. plugins=(`echo ${ALL_PLUGINS[@]}`)
  16. fi
  17. length=${#plugins[@]}
  18. echo
  19. echo Now have ${length} plugins
  20. echo
  21. #publish protocols
  22. echo
  23. echo Now publish protocols
  24. echo ---------------------------------
  25. ./toolsForPublish/publishPlugin.sh "protocols" ${TARGET_ROOT} ${PLUGIN_ROOT}
  26. echo ---------------------------------
  27. #publish plugins
  28. for plugin_name in ${plugins[@]}
  29. do
  30. echo
  31. echo Now publish ${plugin_name}
  32. echo ---------------------------------
  33. ./toolsForPublish/publishPlugin.sh "plugins/"${plugin_name} ${TARGET_ROOT} ${PLUGIN_ROOT}
  34. echo ---------------------------------
  35. done
  36. echo
  37. popd