From 5bf55a76fede533516b8e6a96797a7e19f6ab6df Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 13 Aug 2015 20:32:30 +0200 Subject: [PATCH] Handle ~ in env.sh for some shells --- env.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/env.sh b/env.sh index 46d6642263e73..a154d7ffb38af 100755 --- a/env.sh +++ b/env.sh @@ -1,7 +1,9 @@ #!/bin/sh pfx="$1" -if [ "`echo $pfx | cut -c 1`" != / ]; then +if [ "`echo $pfx | cut -c 1`" = ~ ]; then + pfx="$HOME/$pfx" +elif [ "`echo $pfx | cut -c 1`" != / ]; then pfx="$PWD/$pfx" fi