Wednesday, August 31, 2011

Re: Installing on OSX 10.4.7

David Fishburn, Wed 2011-08-31 @ 10:28:51-0400:
> This is where the problem starts.
> As I am trying to use this from the console (only), the site also
> provides a shell script to be used to launch Vim.
>
> Also download http://macvim.org/OSX/files/gvim ->
> This I copied to /usr/bin/gvim
>
> When I attempt to use it I get:
>
> -bash-2.05b$ ./gvim
> ./gvim: line 1: basename: command not found
> dyld: Library not loaded: /System/Library/Perl/lib/5.8/libperl.dylib
> Referenced from: /Applications/Vim.app/Contents/MacOS/Vim
> Reason: image not found
> Trace/BPT trap
>
>
> The script only references basename once:
>
> # Next, peek at the name used to invoke this script, and set options
> # accordingly.
> name="`basename "$0"`"
>
>
> I don't see anything wrong with that, nor do I really know what it is for.

I'm not sure why you need a shell script to launch Vim, but ignoring
that...

basename is just a simple tool that strips off the "path prefix" of a
pathname. So if you type `basename /foo/bar/baz` at a shell prompt, it
will print "baz".

The `$0` is shell syntax which is expanded to the name used to invoke
the script on the command line. So if you run the script as
`./myscript`, then `$0` would be replaced with "./myscript" and
`basename $0` would be "myscript".

So if your AppleTV doesn't have basename available, you can replace that
line with something like this, and it should do the same thing:

name="myscript"

where "myscript", of course, is the command you're using to invoke the
script, minus the /path/to/script/ prefix, if any exists.

Hope that helps.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: