Skip to content
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

Create get-ghcup.sh, fixes #36 #41

Closed
wants to merge 1 commit into from
Closed

Create get-ghcup.sh, fixes #36 #41

wants to merge 1 commit into from

Conversation

m-renaud
Copy link

@m-renaud m-renaud commented Nov 4, 2018

This follows the style of the rustup installation script that has a friendly welcome message, tells you what the script is going to do, and then asks if you'd like to proceed. This is meant to be a one-command setup of everything you need to get started with Haskell.

I already had this written so adding it for comparison to #40. Would still need to update README and clean a few things up. Let me know what you think!

This follows the style of the rustup installation script that has a friendly welcome message, tells you what the script is going to do, and then asks if you'd like to proceed. This is meant to be a one-command setup of everything you need to get started with Haskell.
# not then add it.
if [ -z "`cat "$HOME/.bashrc" | grep 'source "$HOME/.ghcup/env"'`" ]; then
echo "Updating $HOME/.bashrc to source ghcup environment file..."
echo 'source "$HOME/.ghcup/env"' >> $HOME/.bashrc
Copy link
Member

@hasufell hasufell Nov 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, no, never :)

Changing user configuration files like bashrc is something that I don't want to do at all. This is very intrusive and may not even work, depending on how the bashrc file is structured.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wasn't sold on this either, the rustup script does something similar, but adds it to .profile which is arguably the correct place. I used .bashrc to mirror the readme instructions but you're correct this could very well break things. It would be nice if system configuration was a bit more structured :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be ok if this is interactive and asks in CAPITAL LETTERS IF YOU REALLY WANT US TO APPEND TO YOUR BASHRC ;)

@hasufell
Copy link
Member

hasufell commented Nov 5, 2018

Thanks, the messages in this PR are better, but I think feature wise #40 is a bit more comprehensive, so maybe I'll improve the user facing messages.

@m-renaud m-renaud closed this Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants