#!/bin/bash cur_date="`date +%Y-%m-%d`" RELEASE_DIR=./release RELEASE_PACKAGE=$RELEASE_DIR/ops-exporters mkdir -p $RELEASE_DIR mkdir -p $RELEASE_PACKAGE rm -rf $RELEASE_PACKAGE/* cp -rf ./code/lib $RELEASE_PACKAGE/ cp -rf ./code/conf $RELEASE_PACKAGE/ cp -rf ./code/*Exporters.sh $RELEASE_PACKAGE/ cp -rf ./code/dos2unixAll.sh $RELEASE_PACKAGE/ cp -rf ./code/cleanLogs.sh $RELEASE_PACKAGE/ chmod -R +x $RELEASE_PACKAGE/*.sh chmod -R +x $RELEASE_PACKAGE/lib/* mkdir -p $RELEASE_PACKAGE/log cd $RELEASE_DIR tar -zcf ./ops-exporters-v${cur_date}.tar.gz ./ops-exporters echo "打包成功"