build_release.sh 705 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. if [ $# -eq 0 ]; then
  3. echo "Please insert a version number. like 2.1.0"
  4. exit
  5. fi
  6. sed -i 's/(Development)/(Release)/g' include/Util.hpp #change Development to Release
  7. touch src/main.cpp # to make sure it changes
  8. if cate release_smol -f -t16; then
  9. sed -i 's/(Release)/(Development)/g' include/Util.hpp #change it back
  10. cd release
  11. echo "cp -f cate /usr/bin/cate" > install.sh #generate the install file
  12. chmod +x install.sh #add permissons
  13. tar -czvf linux_cate_v$1.tar.gz cate install.sh #create tar
  14. zip -9 linux_cate_v$1.zip cate install.sh #create zip
  15. rm install.sh #clean
  16. cd ..
  17. else
  18. sed -i 's/(Release)/(Development)/g' src/Util.hpp #change it back
  19. echo "Build error, bye bye"
  20. fi