simple os-detection with shell script#7
Open
arianao19 wants to merge 2 commits into
Open
Conversation
bew
reviewed
Aug 13, 2020
| . os-detect | ||
|
|
||
| case "${grep_command}" in | ||
| UNKNOWN*) echo "support only unix system";; |
There was a problem hiding this comment.
Why not put this part in the os-detect file with an exit?
It will not run anyway, and I think it would simplify the zkt{,-raw} scripts
Author
There was a problem hiding this comment.
I just got the idea from you, just adding exit $? in the end of os-detect right?to be honest, my knowledge of shell scripts is lacking
sirupsen
reviewed
Aug 13, 2020
| OS_TYPE="$(uname -s)" | ||
| case "${OS_TYPE}" in | ||
| Linux*) sort_command=sort grep_command=grep;; | ||
| Darwin*) sort_command=gsort grep_command=ggrep;; |
Owner
There was a problem hiding this comment.
If these don't exist, we'll need to print a warning to install them!
Author
There was a problem hiding this comment.
I'm sorry, I was too late to respond to this. based on 000bbf7#r470224199 i think we could print a warning. and then do exit from os-detect file. is it good?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in response to issue #6, i wrote a simple and minimal way for this.