Added the new files to install.sh

Now I must create them :)
This commit is contained in:
Mika Suomalainen 2011-08-16 07:48:28 +03:00
parent 1327b5d143
commit cdede3caad
1 changed files with 23 additions and 13 deletions

View File

@ -1,12 +1,18 @@
#!/bin/bash #!/bin/bash
# This script "installs" files in this gist. This script is created by Mika Suomalainen (Mkaysi). echo "If you are upgrading, press ctrl + c NOW! You have 15 seconds time to cancel this.
# WARNING: This will overwrite your .bashrc, .bash_aliases and .bash_profile ! re running this script will overwrite your backups and it makes uninstall.sh useless."
# NOTICE: For this script to work, you must cd to folder where this script is and run ./install.sh echo "Taking backups..."
# touch ~/.bashrc # Creates .bashrc if you don't have one.
# WARNING: USE THIS SCRIPT WITH YOUR OWN RESPONSIBLITY. AUTHOR OF THIS SCRIPT IS NOT RESPONSIBLE cat ~/.bashrc > ~/.bashrc.default.backup # Backups your current .bashrc
# OF ANY HARMS WHICH MIGHT BE CAUSED BY THIS SCRIPT. NOTICE THAT AS SAID BEFORE, THIS WILL touch ~/.bash_aliases # Creates .bash_aliases if you don't have one.
# OVERWRITE YOUR CURRENT .bashrc, .bash_aliases AND .bash_profile ! YOU HAVE BEEN WARNED! cat ~/.bash_aliases > ~/.bash_aliases.default.backup # Backups your current .bash_aliases
# touch ~/.bash_profile # Creates .bash_profile if you don't have it already.
cat ~/.bash_profile > ~/.bash_profile.default.backup # Back ups your current bash_profile.
touch ~/.bash_imports # Creates .bash_imports (this is my idea, I am surprised if you have it.)
cat ~/.bash_imports > ~/.bash_imports.default.backup # Backs up .bash_import.
touch ~/.bash_functions # I am surprised if you have this, see above.
cat ~/.bash_functions > ~/.bash_functions.default.backup # Backs up .bash_functions .
echo "Done!"
echo "Installing bash_aliases." echo "Installing bash_aliases."
cat bash_aliases > ~/.bash_aliases cat bash_aliases > ~/.bash_aliases
echo "bash_aliases installed." echo "bash_aliases installed."
@ -15,12 +21,16 @@ cat bash_profile > ~/.bash_profile
echo "bash_profile installed." echo "bash_profile installed."
echo "Installing bashrc." echo "Installing bashrc."
cat bashrc > ~/.bashrc cat bashrc > ~/.bashrc
echo "Installing bash_imports"
cat bash_imports > ~/.bash_imports
echo "Installing bash_functions"
cat bash_functions > ~/.bash_functions
echo "bashrc installed." echo "bashrc installed."
echo "Sourcing bash_aliases..." #echo "Sourcing bash_aliases..."
source ~/.bash_aliases #source ~/.bash_aliases
echo "Sourcing bashrc..." #echo "Sourcing bashrc..."
source ~/.bashrc #source ~/.bashrc
# echo "Sourcing bash_profile..." # echo "Sourcing bash_profile..."
# source bash_profile # source bash_profile
## The above is not required, because my bash_profile only sources bashrc. ## The above is not required, because my bash_profile only sources bashrc.
echo "Installation has completed." echo "Installation has completed. Now run source ~/.bashrc to enable the new things."