packageExporters.sh 592 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. cur_date="`date +%Y-%m-%d`"
  3. RELEASE_DIR=./release
  4. RELEASE_PACKAGE=$RELEASE_DIR/ops-exporters
  5. mkdir -p $RELEASE_DIR
  6. mkdir -p $RELEASE_PACKAGE
  7. rm -rf $RELEASE_PACKAGE/*
  8. cp -rf ./code/lib $RELEASE_PACKAGE/
  9. cp -rf ./code/conf $RELEASE_PACKAGE/
  10. cp -rf ./code/*Exporters.sh $RELEASE_PACKAGE/
  11. cp -rf ./code/dos2unixAll.sh $RELEASE_PACKAGE/
  12. cp -rf ./code/cleanLogs.sh $RELEASE_PACKAGE/
  13. chmod -R +x $RELEASE_PACKAGE/*.sh
  14. chmod -R +x $RELEASE_PACKAGE/lib/*
  15. mkdir -p $RELEASE_PACKAGE/log
  16. cd $RELEASE_DIR
  17. tar -zcf ./ops-exporters-v${cur_date}.tar.gz ./ops-exporters
  18. echo "打包成功"