Mercurial > repos > other > linux
view setup.sh @ 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 |
line wrap: on
line source
#! /bin/bash 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 $SOURCEFILE $2 elif [ "$(readlink $2)" != "$SCRIPTPATH/$1" ]; then echo "Unable to link $1 config - $2 already existed" >&2 fi #Else it already existed but was correct } create_symlink tmux.conf ~/.tmux.conf create_symlink hgrc ~/.hgrc create_symlink bashrc ~/.bashrc create_symlink /usr/lib/python*/site-packages/hgext/hgview.py ~/.hgview.py