changeset 897:4c1899b8560d

8024200: handle hg wrapper with space after #! Reviewed-by: tbell
author mduigou
date Tue, 03 Sep 2013 15:23:16 -0700
parents dc4ec31fe96a
children ff115bc0aa2b
files common/bin/hgforest.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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