sum.sh 696 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. sum_file () {
  3. if [[ -f "$1" ]]; then
  4. shasum -a 256 $1 > $1.sha256
  5. shasum $1 > $1.sha1
  6. fi
  7. }
  8. if [[ "$SHOULD_BUILD" == "yes" ]]; then
  9. if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  10. sum_file VSCodium-darwin-*.zip
  11. else # linux
  12. if [[ "$BUILDARCH" == "x64" ]]; then
  13. deb_arch=amd64
  14. rpm_arch=x86_64
  15. elif [[ "$BUILDARCH" == "ia32" ]]; then
  16. deb_arch=i386
  17. rpm_arch=i386
  18. fi
  19. sum_file VSCodium-linux*.tar.gz
  20. sum_file vscode/.build/linux/deb/${deb_arch}/deb/*.deb
  21. sum_file vscode/.build/linux/rpm/${rpm_arch}/*.rpm
  22. cp vscode/.build/linux/deb/${deb_arch}/deb/*.sha256 .
  23. cp vscode/.build/linux/rpm/${rpm_arch}/*.sha256 .
  24. fi
  25. fi