# HG changeset patch # User Matti Hamalainen # Date 1316345020 -10800 # Node ID edfb5738a86ab651e579a11408355391a4c6881d # Parent 25d3461d9f2f0b814c8455128bb7d007c75955e3 Simplify how running directory is determined. diff -r 25d3461d9f2f -r edfb5738a86a hg2cl --- a/hg2cl Mon Jan 24 11:37:46 2011 +0200 +++ b/hg2cl Sun Sep 18 14:23:40 2011 +0300 @@ -119,12 +119,8 @@ fi # find the directory that this script resides in -prog="$0" -while test -h "$prog"; do - prog=`ls -ld "$prog" | sed "s/^.*-> \(.*\)/\1/;/^[^/]/s,^,$(dirname "$prog")/,"` -done -dir=`dirname $prog` -dir=`cd $dir && pwd` +dir=`dirname "$0"` +dir=`cd "$dir" && pwd` XSL="$dir/svn2cl.xsl" # redirect stdout to the changelog file if needed