package.sh 891 B

12345678910111213141516171819202122232425262728293031323334
  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.jar $ROOT/tmp/lib/influxdb.jar
  12. cp -rf $ROOT/iotdb/target/iotdb-0.0.1-SNAPSHOT-jar-with-dependencies.jar $ROOT/tmp/lib/iotdb.jar
  13. cp -rf $ROOT/tsdb/target/tsdb-0.0.1-SNAPSHOT-jar-with-dependencies.jar $ROOT/tmp/lib/tsdb.jar
  14. cp -rf $ROOT/shell $ROOT/tmp/
  15. cp -rf $ROOT/conf $ROOT/tmp/
  16. chmod -R +x $ROOT/shell/
  17. cd $ROOT
  18. if [ ! -d "release" ]; then
  19. mkdir -p release
  20. fi
  21. mv $ROOT/tmp $ROOT/tsdb-benchmark
  22. cd $ROOT
  23. tar -zcf $ROOT/release/tsdb-benchmark-v${cur_date}.tar.gz ./tsdb-benchmark
  24. rm -rf $ROOT/tsdb-benchmark/*
  25. rmdir $ROOT/tsdb-benchmark
  26. echo "打包成功"