Skip to content

Commit

Permalink
Get the rc location before modifying $PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
jhanssen committed Apr 9, 2013
1 parent 74e2f6a commit 1174256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/gcc-rtags-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ function followSymlink()
python -c "import os, sys; print os.path.realpath(\"$1\")"
}

rc=`which rc`
for i in `which -a "\`basename $0\`"`; do
resolved=`followSymlink $i`
if [ `basename $resolved` != "gcc-rtags-wrapper.sh" ]; then
[ -n "$RTAGS_SERVER_FILE" ] && RTAGS_ARGS="$RTAGS_ARGS -n$RTAGS_SERVER_FILE"
[ -n "$RTAGS_PROJECT" ] && RTAGS_ARGS="$RTAGS_ARGS --with-project=$RTAGS_PROJECT"
[ -z "$RTAGS_COMPILE_TIMEOUT" ] && RTAGS_COMPILE_TIMEOUT=3000
rc=`which rc`
args=`which rtags_args`
[ -n "$args" ] && RTAGS_ARGS="$RTAGS_ARGS `$args \"$@\"`"

Expand Down

0 comments on commit 1174256

Please sign in to comment.