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

Change Initial Script to Populate Bash/Zsh Profile #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

danielspector
Copy link

One of the improvement suggestions made was to help the installation by making it easier to get started. This will automatically append the radiation command to a user's bash or zsh profile. I figured it would be easier to maintain to use a bash script rather than a ruby file with system commands.

I also changed the README to reflect the new instructions.

Would love any input.

@sts10
Copy link
Owner

sts10 commented Nov 16, 2014

Hey man, thanks for this!

Before I merge though-- what happens if a user runs this new install script twice? Obviously they only need to run it once given what's in there, but I'm trying to keep the process as fool-proof as possible.

Will their bash_profile now contain two radiation functions? What do you think about the current solution I put in where it greps for "function radiation"?:

has_function = open('../.bash_profile').grep(/function radiation/)
if has_function != []
    # etc.

@danielspector
Copy link
Author

Hmm... It should probably check for a zsh profile as well as bash, other than that you're right the script is currently populating the profile with the function regardless of whether it exists or not. I'm going to look into fixing it and will update the request.

@sts10
Copy link
Owner

sts10 commented Nov 21, 2014

That'd be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants