Skip to content

Commit 12e39c7

Browse files
Merge pull request #5 from richardkchapman/gitparent
Add openlink (used by git-pr)
2 parents 61814c9 + 6a49c66 commit 12e39c7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

openlink

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
platform='unknown'
4+
unamestr=`uname`
5+
if [[ "$unamestr" == 'Linux' ]]; then
6+
platform='linux'
7+
elif [[ "$unamestr" == 'FreeBSD' ]]; then
8+
platform='freebsd'
9+
elif [[ "$unamestr" == 'Darwin' ]]; then
10+
platform='osx'
11+
fi
12+
13+
if [ "$platform" = "osx" ]; then
14+
open $1
15+
elif [ "$platform" = "linux" ]; then
16+
google-chrome $1 2>&1 > /dev/null &
17+
else
18+
echo $url
19+
fi

0 commit comments

Comments
 (0)