utils.sh 404 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. #
  3. # Util functions for release scripts
  4. #
  5. set -e
  6. set -o pipefail
  7. function browser() {
  8. local url=$1
  9. xdg-open $url || open $url
  10. }
  11. function find_remote() {
  12. local url=$1
  13. for remote in $(git remote); do
  14. git config --get remote.${remote}.url | grep $url > /dev/null && echo -n $remote
  15. done
  16. # Always return true, extra remotes cause it to return false
  17. true
  18. }