changeset 3:2a6d32a03c0e

Work around differing paths for hgview
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Jul 2013 20:19:21 +0100
parents a5fc9c16087c
children 2c7cac745457
files hgrc setup.sh
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgrc	Sat Jul 27 19:57:26 2013 +0100
+++ b/hgrc	Sat Jul 27 20:19:21 2013 +0100
@@ -8,7 +8,7 @@
 
 [extensions]
 extdiff =
-hgext.hgview = /usr/lib/python2.7/site-packages/hgext/hgview.py
+hgext.hgview = ~/.hgview.py
 bookmarks =
 hgext.convert=
 color =
--- a/setup.sh	Sat Jul 27 19:57:26 2013 +0100
+++ b/setup.sh	Sat Jul 27 20:19:21 2013 +0100
@@ -2,8 +2,12 @@
 
 SCRIPTPATH=`dirname $(readlink -f $0)`
 create_symlink() {
+	SOURCEFILE=$1
+	if [ "${SOURCEFILE:0:1}" != "/" ]; then
+		SOURCE_FILE=$SCRIPTPATH/$1
+	fi
 	if [ ! -e $2 ]; then
-		ln -s $SCRIPTPATH/$1 $2
+		ln -s $SOURCEFILE $2
 	elif [ "$(readlink $2)" != "$SCRIPTPATH/$1" ]; then
 		echo "Unable to link $1 config - $2 already existed" >&2
 	fi
@@ -12,4 +16,5 @@
 
 create_symlink tmux.conf ~/.tmux.conf
 create_symlink hgrc ~/.hgrc
-create_symlink bashrc ~/.bashrc
\ No newline at end of file
+create_symlink bashrc ~/.bashrc
+create_symlink /usr/lib/python*/site-packages/hgext/hgview.py ~/.hgview.py
\ No newline at end of file