package-gcc7.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. set -e
  3. base_dir=$(
  4. cd "$(dirname "$0")"
  5. pwd
  6. )
  7. cd $base_dir
  8. cur_date="`date +%Y-%m-%d`"
  9. # Init common
  10. rm -rf ./tmp
  11. mkdir -p ./tmp/tsdb
  12. cp -rf ./include ./tmp/tsdb/
  13. cp -rf ./demo ./tmp/tsdb/
  14. mkdir -p ./tmp/tsdb/lib/aarch64
  15. mkdir -p ./tmp/tsdb/lib/x86-64
  16. # Build armv8
  17. ./deploy.sh -pr:h=./profiles/armv8-gcc7
  18. cp ./build/deploy/lib/lib*.a ./tmp/tsdb/lib/aarch64/
  19. # Build x64
  20. ./deploy.sh -pr:h=./profiles/x64-gcc7
  21. cp ./build/deploy/lib/lib*.a ./tmp/tsdb/lib/x86-64/
  22. # Package lf & hf versions
  23. mkdir -p ./release
  24. cd ./tmp
  25. # tar -czvf $base_dir/release/tsdb-v${cur_date}.tar.gz tsdb
  26. cp -f $base_dir/README-hf.md ./tsdb/README.md
  27. tar --exclude='tsdb/include/tsdb.h' --exclude='tsdb/demo/tsdbtest_lf.cpp' -czvf $base_dir/release/tsdb_hf-gcc7-v${cur_date}.tar.gz tsdb
  28. cp -f $base_dir/README-lf.md ./tsdb/README.md
  29. tar --exclude='tsdb/include/tsdb_hf.h' --exclude='tsdb/demo/tsdbtest_hf.cpp' -czvf $base_dir/release/tsdb_lf-gcc7-v${cur_date}.tar.gz tsdb
  30. cd $base_dir
  31. rm -rf ./tmp
  32. # Done!
  33. echo "✅ 打包成功"