mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge pull request #834 from dennisjbell/master
Fix `Class MMBackend` duplication bug on launch
This commit is contained in:
+11
-15
@@ -11,21 +11,17 @@
|
||||
# Bjorn Winckler (Aug 13 2007).
|
||||
|
||||
# Find Vim executable
|
||||
if [ -L "$0" ]; then
|
||||
# readlink -f
|
||||
curdir=`pwd -P`
|
||||
self_path=$0
|
||||
cd "`dirname $self_path`"
|
||||
while [ -L "$self_path" ]; do
|
||||
self_path=`readlink $self_path`
|
||||
cd "`dirname $self_path`"
|
||||
self_path=`basename $self_path`
|
||||
done
|
||||
binary="`pwd -P`/../MacOS/Vim"
|
||||
cd "$curdir"
|
||||
else
|
||||
binary="`dirname "$0"`/../MacOS/Vim"
|
||||
fi
|
||||
orig_path="$(pwd -P)"
|
||||
self_path="$0"
|
||||
while [ -L "$self_path" ]; do # dereference links
|
||||
link="$(basename "$self_path")"
|
||||
cd "$(dirname "$self_path")"
|
||||
self_path="$(readlink "$link")"
|
||||
done
|
||||
cd "$(dirname "$self_path")"
|
||||
binary="$(dirname "$(pwd -P)")/MacOS/Vim"
|
||||
cd "$orig_path"
|
||||
|
||||
if ! [ -x "$binary" ]; then
|
||||
echo "Sorry, cannot find Vim executable."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user