#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG					#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2014 Christopher Bratusek		#
#							#
#########################################################

if [[ -d .git ]]; then
	git remote -v | grep fetch | \
		sed 's/\(.*github.com\)[:|/]\(.*\).git (fetch)/\2/' | \
		awk {'print "https://github.com/" $1'} | \
		xargs x-www-browser || echo "not a github repository"
else	echo "current directory is not the root of a git repository"
fi
