axmol/plugin/tools/publish.sh

48 lines
953 B
Bash
Raw Normal View History

2013-04-07 16:58:26 +08:00
SHELL_DIR=$(cd "$(dirname "$0")"; pwd)
pushd ${SHELL_DIR}
source ./config.sh
if [ -d ${TARGET_ROOT} ]; then
rm -rf ${TARGET_ROOT}
fi
mkdir -p ${TARGET_ROOT}
#check the environment
./toolsForPublish/checkEnvironment.sh
source ./toolsForPublish/environment.sh
# output the number of plugins
if [ $1 ]; then
plugins=(${1//:/ })
else
plugins=(`echo ${ALL_PLUGINS[@]}`)
fi
length=${#plugins[@]}
echo
echo Now have ${length} plugins
echo
#publish protocols
echo
echo Now publish protocols
echo ---------------------------------
2013-06-06 11:21:45 +08:00
./toolsForPublish/publishPlugin.sh "protocols" ${TARGET_ROOT} ${PLUGIN_ROOT}
2013-04-07 16:58:26 +08:00
echo ---------------------------------
#publish plugins
for plugin_name in ${plugins[@]}
do
echo
echo Now publish ${plugin_name}
echo ---------------------------------
./toolsForPublish/publishPlugin.sh "plugins/"${plugin_name} ${TARGET_ROOT} ${PLUGIN_ROOT}
echo ---------------------------------
done
echo
popd