package.sh 485 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. shopt -s nullglob
  3. if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
  4. sudo chmod -R +w /usr/local/Cellar
  5. cpack -G Bundle;
  6. fi
  7. if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${CC}" = "gcc" ]; then
  8. cpack --config CPackSourceConfig.cmake -G TGZ;
  9. fi
  10. for file in SuperTux-*; do
  11. hash="$(sha512sum "${file}" | awk -F' ' '{print $1;}')"
  12. printf 'Uploading %s (SHA-2-512: %s)\n' "${file}" "${hash}"
  13. curl --upload-file "${file}" "https://transfer.sh/${file}"
  14. done