Glavin001 / Glavin001/dotfiles
Verify if bashrc on Mac is already loaded in bash_profile
- Dominant language
- Vim Script
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
See http://stackoverflow.com/a/4749368/2578205
``` bash
echo "=== Configuring Bash_Profile to load Bashrc ==="
sourceBashrc="source ~/.bashrc"
if grep -Fxq "$sourceBashrc" ~/.bash_profile
then
# code if found
echo "Bashrc correctly setup."
else
# code if not found
echo "Your bash_profile is missing bash_rc."
read -p "Would you like to automatically configure it now? (y/N) " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
# do dangerous stuff
echo "$sourceBashrc" >> ~/.bash_profile
fi
fi
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.