Last active
August 29, 2015 14:07
-
-
Save itsthatguy/89f643f456d2c98d6b7e to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/env bash | |
| function install_awesome { | |
| local default="~/awesome.sh" | |
| read -p "Where do you want to install these aliases? [$default]: " REPLY | |
| REPLY=${REPLY:-$default} | |
| echo -e "\n# INSTALLING THE AWESOME... | |
| location: $REPLY\n" | |
| echo -e "# Very important aliases | |
| alias nyan='telnet nyancat.dakko.us' | |
| alias starwars='telnet towel.blinkenlights.nl' | |
| " >> `eval echo ${REPLY}` | |
| reload_shell | |
| } | |
| function reload_shell { | |
| local MSG="# RELOADING BASH..." | |
| if [ -n "$ZSH_VERSION" ]; then | |
| MSG="# RELOADING ZSH..." | |
| [ -d "$HOME/.zshrc" ] && source .zshrc | |
| elif [ -n "$BASH_VERSION" ]; then | |
| [ -d "$HOME/.bashrc" ] && source .bashrc | |
| [ -d "$HOME/.bash_profile" ] && source .bash_profile | |
| else | |
| MSG="# unknown shell... Manually reload your shell" | |
| fi | |
| echo -e "$MSG\n" | |
| echo -e "# YOU'VE BEEN AWESOMED!" | |
| echo -e "Use `nyan` or `starwars` and embrace the awesome!\n" | |
| } | |
| install_awesome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment