package.sh 850 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. cur_date="`date +%Y-%m-%d`"
  3. ROOT=$(cd `dirname $0`; pwd)
  4. mkdir -p $ROOT/tmp
  5. rm -rf $ROOT/tmp/*
  6. mkdir -p $ROOT/tmp/lib
  7. mkdir -p $ROOT/tmp/log
  8. mkdir -p $ROOT/tmp/log/influxdb
  9. mkdir -p $ROOT/tmp/log/iotdb
  10. mkdir -p $ROOT/tmp/log/tsdb
  11. cp -rf $ROOT/influxdb/target/influxdb-0.0.1-SNAPSHOT-jar-with-dependencies $ROOT/tmp/lib/influxdb.jar
  12. cp -rf $ROOT/iotdb/target/iotdb-0.0.1-SNAPSHOT-jar-with-dependencies $ROOT/tmp/lib/iotdb.jar
  13. cp -rf $ROOT/tsdb/target/tsdb-0.0.1-SNAPSHOT-jar-with-dependencies $ROOT/tmp/lib/tsdb.jar
  14. cp -rf $ROOT/shell $ROOT/tmp/
  15. chmod -R +x $ROOT/shell/
  16. cd $ROOT
  17. if [ ! -d "release" ]; then
  18. mkdir -p release
  19. fi
  20. mv $ROOT/tmp $ROOT/tsdb-benchmark
  21. cd $ROOT
  22. tar -zcf $ROOT/release/tsdb-benchmark-v${cur_date}.tar.gz ./tsdb-benchmark
  23. rm -rf $ROOT/tsdb-benchmark/*
  24. rmdir $ROOT/tsdb-benchmark
  25. echo "打包成功"