File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111# Bjorn Winckler (Aug 13 2007).
1212
1313# Find Vim executable
14- if [ -L " $0 " ]; then
15- # readlink -f
16- curdir=` pwd -P`
17- self_path=$0
18- cd " ` dirname $self_path ` "
19- while [ -L " $self_path " ]; do
20- self_path=` readlink $self_path `
21- cd " ` dirname $self_path ` "
22- self_path=` basename $self_path `
23- done
24- binary=" ` pwd -P` /../MacOS/Vim"
25- cd " $curdir "
26- else
27- binary=" ` dirname " $0 " ` /../MacOS/Vim"
28- fi
14+ orig_path=" $( pwd -P) "
15+ self_path=" $0 "
16+ while [ -L " $self_path " ]; do # dereference links
17+ link=" $( basename " $self_path " ) "
18+ cd " $( dirname " $self_path " ) "
19+ self_path=" $( readlink " $link " ) "
20+ done
21+ cd " $( dirname " $self_path " ) "
22+ binary=" $( dirname " $( pwd -P) " ) /MacOS/Vim"
23+ cd " $orig_path "
24+
2925if ! [ -x " $binary " ]; then
3026 echo " Sorry, cannot find Vim executable."
3127 exit 1
You can’t perform that action at this time.
0 commit comments