# HG changeset patch # User mduigou # Date 1378246996 25200 # Node ID 4c1899b8560d3310740cefa87971c02f0f07912b # Parent dc4ec31fe96a1e0fd30d95a7c69f36ad6dc53e9a 8024200: handle hg wrapper with space after #! Reviewed-by: tbell diff -r dc4ec31fe96a -r 4c1899b8560d common/bin/hgforest.sh --- a/common/bin/hgforest.sh Wed Apr 03 16:26:10 2013 -0700 +++ b/common/bin/hgforest.sh Tue Sep 03 15:23:16 2013 -0700 @@ -47,7 +47,7 @@ bpython="" if [ "#!" = "$has_hash_bang" ] ; then - python="`head -n 1 ${whichhg} | cut -b 3-`" + python="`head -n 1 ${whichhg} | cut -b 3- | sed -e 's/^[ \t]*//;s/[ \t]*$//'`" bpython="`basename "$python"`" fi