Patch get-repository.sh [WAS] addition to the documentation

Cameron Simpson cs at zip.com.au
Sun Jan 29 10:04:40 GMT 2017


On 29Jan2017 09:30, J <offlineimap at 927589452.de> wrote:
>the functions are defined in a different way in sh
>see attached diff/patch ( I am too dumb to get it to my repository to
>have it in a pull request

Yeah, that looks nicer to me.

>and i am still using the env variable because it is AFAIK the new
>standard way

No, it is not "the new standard way", it is just the standard hack for when you 
don't know the exact (fixed) path to an executable. For example, bash might be 
in /bin or /usr/local/bin or somewhere else (or, my typical concern, not 
present).

Whereas /bin/sh is _always_ in exactly that place. It is even a POSIX 
requirement. So you can always go:

  #!/bin/sh

because it never moves.

The "env variable" isn't really any better - it totally relies on the "env" 
command being exactly where you say. With /bin/sh you never need that hack.

Would people wleome further patches to this script? There's a lot of things it 
might do better than it currently does.

Cheers,
Cameron Simpson <cs at zip.com.au>




More information about the OfflineIMAP-project mailing list