Skip to content

Commit

Permalink
Handle ~ in env.sh for some shells
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Aug 13, 2015
1 parent 1842142 commit 5bf55a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion env.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 5bf55a7

Please sign in to comment.