#!/bin/bash
CTP_SO_NAME=libctpmd.so
PLUGINS_INDIR=../../bin/release/plugins/
PLUGINS_OUTDIR=/home/admin/online/release/plugins/
# 编译 libctpmd.so
if [ -f 'makefile' ] || [ -f 'Makefile' ] # [] 内侧两端的空格 不能省略!!!
then
if ! make release # 判断 编译是否出错
then
echo make error.
exit
fi
else
echo 'makefile or Makefile not exist.'
fi
sleep 1s
# 部署到 $PLUGINS_OUTDIR
cp ${PLUGINS_INDIR}${CTP_SO_NAME} ${PLUGINS_OUTDIR}
sleep 1s
echo
echo -------- $CTP_SO_NAME deployment complete. --------
ls -l ${PLUGINS_OUTDIR}${CTP_SO_NAME}
sleep 1s
echo
# 自动跳转到执行目录下(终端需用source命令)
cd /home/admin/online/release/