-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add system make installation check #25
Conversation
Give a user a prompt that system make not install yet.
scripts/init
Outdated
# find make | ||
MAKE=$(which make 2>/dev/null) | ||
|
||
if (( $? == 1 )); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like this to be fenced by an environment variable, like $DEVENVVERBOSE
or $DEVENVDEBUG
. I think most of the time we would like devenv
to be lean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some coding style bike-shedding for your reference.
MAKE=$(which make 2>/dev/null) | ||
|
||
if (( $? == 1 )); then | ||
echo " " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo " "
echo an empty space is equivalent to echo ""
. Do you prefer which one?
scripts/env.d/vars
Outdated
if (( $? == 1 )); then | ||
echo " " | ||
echo "ERROR: make needs to be installed to run devenv. " | ||
echo " Install make using the command such as ' apt install build-essential' as root and try again. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure the leading and trailing spaces are meant to be. Besides, ' apt install build-essential'
has a leading space as well. Are they typo or on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's on purpose. Actually the end of apt install build-essential
needs space, too.
The space between command and quotes is avoiding the user copy the single quote
The purpose of the leading space that means this line is to follow the previous line error message.
echo " " | ||
echo "ERROR: make needs to be installed to run devenv. " | ||
echo " Install make using the command such as ' apt install build-essential' as root and try again. " | ||
echo " " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
It is better put environment variable to the same file.
@ldotrg It seems to me that this PR still has unfinished work and can still be worked on. Why not keep working on it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ldotrg It seems to me that this PR still has unfinished work and can still be worked on. Why not keep working on it?
Instead of adding the warining message and fixing the "space".
I will add building GNU make from source. It's better than obsessed with some spaces and learned nothing in the end.
Because these typo problem could add the .clang_format to auto fix it.
scripts/env.d/vars
Outdated
if (( $? == 1 )); then | ||
echo " " | ||
echo "ERROR: make needs to be installed to run devenv. " | ||
echo " Install make using the command such as ' apt install build-essential' as root and try again. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's on purpose. Actually the end of apt install build-essential
needs space, too.
The space between command and quotes is avoiding the user copy the single quote
The purpose of the leading space that means this line is to follow the previous line error message.
Understood. It makes sense to build make from source. Look forward to your next PR. It would be a good idea to add an issue for the make recipe, so that everyone knows about your plan. |
Give a user a prompt when system make not install yet.