axmol/plugin/tools/config.sh

30 lines
785 B
Bash
Raw Normal View History

2013-04-07 16:58:26 +08:00
#define plugins array
export ALL_PLUGINS=("flurry" "umeng" \
"alipay" "nd91" \
2013-04-24 15:59:54 +08:00
"admob" \
"twitter" "weibo" \
"qh360" "uc")
2013-04-07 16:58:26 +08:00
# define the plugin root directory & publish target directory
export TARGET_DIR_NAME="publish"
if [ ! ${PLUGIN_ROOT} ]; then
pushd ../
export PLUGIN_ROOT=`pwd`
popd
fi
export TARGET_ROOT=${PLUGIN_ROOT}/${TARGET_DIR_NAME}
echo PLUGIN_ROOT = ${PLUGIN_ROOT}
echo TARGET_ROOT = ${TARGET_ROOT}
2013-04-07 16:58:26 +08:00
# get a string include all plugins name(separate with ':')
export PLUGINS_CAN_SELECT=""
PLUGIN_NUM=${#ALL_PLUGINS[@]}
for ((i=0; i<${PLUGIN_NUM}; i++))
do
plugin_name=${ALL_PLUGINS[$i]}
PLUGINS_CAN_SELECT=${PLUGINS_CAN_SELECT}${plugin_name}
if [ $i -ne $((${PLUGIN_NUM}-1)) ]; then
PLUGINS_CAN_SELECT=${PLUGINS_CAN_SELECT}":"
fi
done