1
1
Fork 0

moved zsh install/config to own file. modified prep ubuntu script

This commit is contained in:
david 2012-06-26 23:11:36 +02:00
parent 38a3e28efe
commit 2bc1567af7
2 changed files with 40 additions and 26 deletions

View File

@ -4,52 +4,34 @@
#install various tools
#install various tools/packages
pkginstall()
{
apt-get update && apt-get dist-upgrade -y
apt-get update
apt-get dist-upgrade -y
apt-get install -y htop nload nmap tshark git-core \
curl wget dnsutils fortunes-ubuntu-server \
vim zsh
}
#install and configure zsh
zshinstall()
{
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
rm -rf ~/.oh-my-zsh/custom/
cd ~/.oh-my-zsh/
git clone git://git.socialnerds.org/zshconfig.git custom
read -p "now modify your ~/.zshrc to your needs"
vi ~/.zshrc
read -p "time to change your default shell to /bin/zsh"
sudo vi /etc/passwd
vim zsh ncdu
}
#configure motd
motd()
motdconfig()
{
rm /etc/update-motd.d/10*
rm /etc/update-motd.d/50*
#insert a fancy motd.tail from http://www.network-science.de/ascii/
#echo '
#go to http://www.network-science.de/ascii/ and generate
#a nice ascii servername for /etc/motd.tail'
read -p "\nnow its time to create/customize your /etc/motd.tail\n(http://www.network-science.de/ascii/)"
vi /etc/motd.tail
}
# **** start of script ****
#pkginstall
zshinstall
pkginstall
motdconfig
#end of file

32
zsh_install.sh Normal file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# install and configure zsh
zshinstall()
{
if [ -d ~/.oh-my-zsh/custom/.git ]; then
echo "skipping zsh installation. is already there."
else
echo "installing curl, zsh and git-core as dependencies of zsh configuration"
sudo apt-get update && sudo apt-get install -y curl zsh git-core
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
rm -rf ~/.oh-my-zsh/custom/
cd ~/.oh-my-zsh/
git clone git://git.socialnerds.org/zshconfig.git custom
read -p "\nnow modify your ~/.zshrc to your needs"
vi ~/.zshrc
read -p "\ntime to change your default shell to /bin/zsh"
sudo vi /etc/passwd
fi
}
#start of script
zshinstall
#end of file