bundle-gz-file.sh 561 B

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