#!/bin/bash cur_date="`date +%Y-%m-%d`" ROOT=$(cd `dirname $0`; pwd) mkdir -p $ROOT/tmp rm -rf $ROOT/tmp/* mkdir -p $ROOT/tmp/lib mkdir -p $ROOT/tmp/pid mkdir -p $ROOT/tmp/data mkdir -p $ROOT/tmp/logs cp -rf $ROOT/insert-app/target/insert-app-0.0.1-SNAPSHOT.jar $ROOT/tmp/lib/ cp -rf $ROOT/query-app/target/query-app-0.0.1-SNAPSHOT.jar $ROOT/tmp/lib/ cp -rf $ROOT/probe/target/probe-0.0.1-SNAPSHOT-jar-with-dependencies.jar $ROOT/tmp/lib/ cp -rf $ROOT/init/meta.db $ROOT/tmp/ cp -rf $ROOT/tools $ROOT/tmp/ cp -rf $ROOT/conf $ROOT/tmp/ cp -rf $ROOT/shell $ROOT/tmp/ chmod -R +x $ROOT/shell/ cd $ROOT if [ ! -d "release" ]; then mkdir -p release fi mv $ROOT/tmp $ROOT/blackbox cd $ROOT tar -zcf $ROOT/release/blackbox-v${cur_date}.tar.gz ./blackbox rm -rf $ROOT/blackbox/* rmdir $ROOT/blackbox echo "打包成功"