2015-09-11 07:44:25 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2017-02-16 04:14:25 +01:00
|
|
|
# Util functions for release scripts
|
2015-09-11 07:44:25 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
set -e
|
2015-09-22 16:10:11 +02:00
|
|
|
set -o pipefail
|
2015-09-11 07:44:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
function browser() {
|
|
|
|
local url=$1
|
|
|
|
xdg-open $url || open $url
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function find_remote() {
|
|
|
|
local url=$1
|
|
|
|
for remote in $(git remote); do
|
|
|
|
git config --get remote.${remote}.url | grep $url > /dev/null && echo -n $remote
|
|
|
|
done
|
2015-09-22 16:10:11 +02:00
|
|
|
# Always return true, extra remotes cause it to return false
|
|
|
|
true
|
2015-09-11 07:44:25 +02:00
|
|
|
}
|