bundle-gz-file.sh 535 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/env sh
  2. if [ -f ".temp" ]; then
  3. rm -r ./.temp/
  4. fi
  5. mkdir ./.temp/
  6. cp ../out/artifacts/cmus_rpc_jar/cmus-rpc.jar ./.temp/
  7. cp ./cmus-rpc.sh ./.temp/
  8. cd ./.temp
  9. ls
  10. VER="$1"
  11. echo "Create tar file to cmus-rpc $VER ..."
  12. TARNAME=cmus-rpc-"$VER".tar.gz
  13. tar -cvf "./$TARNAME" ./cmus-rpc.sh ./cmus-rpc.jar
  14. cd ../..
  15. if ! [ -f "./release" ]; then
  16. echo "Create release file"
  17. mkdir release
  18. fi
  19. echo "Move the $TARNAME to release directory."
  20. mv "./scripts/.temp/$TARNAME" ./release
  21. echo "Remove temp folder"
  22. rm -r ./scripts/.temp