Gbrowse (279B) [raw]
1 #!/bin/sh 2 set -e 3 REPO=$(git rev-parse --show-toplevel) 4 [ -z "$REPO" ] && exit 1 5 FILE=${1:-$(readlink -f $samfile)} 6 resource=${FILE##$REPO/} 7 url=$(git remote get-url origin | sed -e 's/^git@//' -e 's@:@/@' -e 's/\.git$//') 8 ${BROWSER:-firefox} "https://$url/blob/master/$resource"