New script $ZSH/tools/require_tool.sh to ensure version of tool #275

Merged
merged 6 commits into from Oct 10, 2011

Conversation

Projects
None yet
2 participants
@tristan0x
Contributor

tristan0x commented Apr 13, 2011

While writing the (future) emacs plugin, I had to ensure version of emacs installed was greater than 23. I remembered this script I had worked with during my studies. I have repacked and it here it is: require_tool.sh

$ ./require_tool.sh emacs 23 ; echo $?
0
$ ./require_tool.sh emacs 50 >/dev/null ; echo $?
emacs 50 or better is required: this is emacs 23.1.1
1

As this might be very helpful to other plugins, I believe `$ZSH/tools' directory is appropriate.

WDYT?

By the way, this zsh repo if a very very good idea. Thank you all!

Cheers

Tristan

@robbyrussell

This comment has been minimized.

Show comment Hide comment
@robbyrussell

robbyrussell Oct 10, 2011

Owner

Thanks for this!

Owner

robbyrussell commented Oct 10, 2011

Thanks for this!

robbyrussell added a commit that referenced this pull request Oct 10, 2011

Merge pull request #275 from tristan0x/require_tool
New script $ZSH/tools/require_tool.sh to ensure version of tool

@robbyrussell robbyrussell merged commit 1ab0054 into robbyrussell:master Oct 10, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment