1234567891011121314151617181920212223242526272829303132 |
- #!/bin/bash
- cur_date="`date +%Y-%m-%d`"
- RELEASE_DIR=./release
- RELEASE_PACKAGE_OPS=$RELEASE_DIR/ops
- mkdir -p $RELEASE_DIR
- mkdir -p $RELEASE_PACKAGE_OPS
- rm -rf $RELEASE_PACKAGE_OPS
- cp -rf ./code/lib $RELEASE_PACKAGE_OPS/
- cp -rf ./code/alert $RELEASE_PACKAGE_OPS/
- cp -rf ./code/conf $RELEASE_PACKAGE_OPS/
- cp -rf ./code/prometheus %RELEASE_PACKAGE_OPS/
- cp -rf ./code/*All.sh $RELEASE_PACKAGE_OPS/
- cp -rf ./code/dos2unixAll.sh $RELEASE_PACKAGE_OPS/
- cp -rf ./code/cleanLogs.sh $RELEASE_PACKAGE_OPS/
- cp -rf ./code/run.sh $RELEASE_PACKAGE_OPS/
- cp -rf ./code/restart.sh $RELEASE_PACKAGE_OPS/
- cp -rf ./code/stop.sh $RELEASE_PACKAGE_OPS/
- cp -rf ./code/status.sh $RELEASE_PACKAGE_OPS/
- chmod -R +x $RELEASE_PACKAGE_OPS/*.sh
- chmod -R +x $RELEASE_PACKAGE_OPS/lib/*
- chmod -R +x $RELEASE_PACKAGE_OPS/alert/lib/*
- chmod -R +x $RELEASE_PACKAGE_OPS/prometheus/lib/*
- mkdir -p $RELEASE_PACKAGE_OPS/log
- cd $RELEASE_DIR
- tar -zcf ./ops-v${cur_date}.tar.gz ./ops
- echo "打包成功"
|