packageX86.sh 751 B

123456789101112131415161718192021222324252627282930313233343536
  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. cp -rf $ROOT/*.sh $ROOT/tmp/
  7. rm -rf $ROOT/tmp/build*
  8. rm -rf $ROOT/tmp/package*
  9. rm -rf $ROOT/tmp/changeName.sh
  10. mkdir -p $ROOT/tmp/build
  11. mkdir -p $ROOT/tmp/new
  12. cp -rf $ROOT/bat/bat $ROOT/tmp/build/bat
  13. cp -rf $ROOT/build/smq* $ROOT/tmp/build/
  14. cp -rf $ROOT/build/curl $ROOT/tmp/build/
  15. cp -rf $ROOT/build/date $ROOT/tmp/build/
  16. cp -rf $ROOT/tests $ROOT/tmp/
  17. cp -rf $ROOT/tests-no-curl $ROOT/tmp/
  18. cp -rf $ROOT/tests-my-curl $ROOT/tmp/
  19. cd $ROOT
  20. if [ ! -d "release" ]; then
  21. mkdir -p release
  22. fi
  23. mv $ROOT/tmp $ROOT/smq
  24. cd $ROOT
  25. tar -zcf $ROOT/release/smq-v${cur_date}.tar.gz ./smq
  26. rm -rf $ROOT/smq/*
  27. rmdir $ROOT/smq
  28. echo "打包成功"