2011-08-14 12:29:44 +02:00
|
|
|
#!/bin/bash
|
2011-08-16 06:48:28 +02:00
|
|
|
echo "If you are upgrading, press ctrl + c NOW! You have 15 seconds time to cancel this.
|
|
|
|
re running this script will overwrite your backups and it makes uninstall.sh useless."
|
|
|
|
echo "Taking backups..."
|
|
|
|
touch ~/.bashrc # Creates .bashrc if you don't have one.
|
|
|
|
cat ~/.bashrc > ~/.bashrc.default.backup # Backups your current .bashrc
|
|
|
|
touch ~/.bash_aliases # Creates .bash_aliases if you don't have one.
|
|
|
|
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.
|
2011-08-16 12:01:00 +02:00
|
|
|
touch ~/.bash_exports # Creates .bash_exports (this is my idea, I am surprised if you have it.)
|
|
|
|
cat ~/.bash_exports > ~/.bash_exports.default.backup # Backs up .bash_exports.
|
2011-08-16 06:48:28 +02:00
|
|
|
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!"
|
2011-08-14 12:29:44 +02:00
|
|
|
echo "Installing bash_aliases."
|
|
|
|
cat bash_aliases > ~/.bash_aliases
|
|
|
|
echo "bash_aliases installed."
|
|
|
|
echo "Installing bash_profile"
|
|
|
|
cat bash_profile > ~/.bash_profile
|
|
|
|
echo "bash_profile installed."
|
|
|
|
echo "Installing bashrc."
|
|
|
|
cat bashrc > ~/.bashrc
|
2011-08-16 12:01:00 +02:00
|
|
|
echo "bashrc installed."
|
|
|
|
echo "Installing bash_exports"
|
|
|
|
cat bash_exports > ~/.bash_exports
|
|
|
|
echo "bash_exports installed."
|
2011-08-16 06:48:28 +02:00
|
|
|
echo "Installing bash_functions"
|
|
|
|
cat bash_functions > ~/.bash_functions
|
2011-08-16 12:01:00 +02:00
|
|
|
echo "bash_functions installed."
|
2011-08-16 06:48:28 +02:00
|
|
|
#echo "Sourcing bash_aliases..."
|
|
|
|
#source ~/.bash_aliases
|
|
|
|
#echo "Sourcing bashrc..."
|
|
|
|
#source ~/.bashrc
|
2011-08-14 17:59:41 +02:00
|
|
|
# echo "Sourcing bash_profile..."
|
|
|
|
# source bash_profile
|
|
|
|
## The above is not required, because my bash_profile only sources bashrc.
|
2011-08-16 12:01:00 +02:00
|
|
|
echo "Installation has completed. Now run 'source ~/.bashrc' to enable the new things."
|