Subversion Repositories MK-Marlin

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ron 1
#!/usr/bin/env bash
2
#
3
# firstpush
4
#
5
# Push a branch to 'origin' and open the
6
# commit log to watch Travis CI progress.
7
#
8
 
9
[[ $# == 0 ]] || { echo "Usage: `basename $0`" 1>&2 ; exit 1; }
10
 
11
MFINFO=$(mfinfo) || exit 1
12
IFS=' ' read -a INFO <<< "$MFINFO"
13
FORK=${INFO[1]}
14
REPO=${INFO[2]}
15
BRANCH=${INFO[5]}
16
 
17
git push --set-upstream origin $BRANCH
18
 
19
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
20
URL="https://github.com/$FORK/$REPO/commits/$BRANCH"
21
 
22
if [ -z "$TOOL" ]; then
23
  echo "Can't find a tool to open the URL:"
24
  echo $URL
25
else
26
  echo "Viewing commits on $BRANCH..."
27
  "$TOOL" "$URL"
28
fi