Created
August 2, 2012 12:48
-
-
Save fiskus/3236798 to your computer and use it in GitHub Desktop.
dummy dotfiles config
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
#!/bin/bash | |
# link rc files | |
configs=(\ | |
".bashrc"\ | |
".beetsconfig"\ | |
".conkyrc"\ | |
".gtkrc-2.0"\ | |
".gvimrc"\ | |
".hgrc"\ | |
".muttrc"\ | |
".mpd.conf"\ | |
".offlineimaprc"\ | |
".pentadactylrc"\ | |
".vimrc"\ | |
".xinitrc"\ | |
".xmobarrc"\ | |
".zshrc" | |
".gitconfig"\ | |
".gtk-bookmarks"\ | |
".i3status.conf"\ | |
".tmux.conf"\ | |
".Xresources"\ | |
".xbindkeysrc"\ | |
".zlogin"\ | |
".zlogout"\ | |
".i3/config"\ | |
".irssi/config"\ | |
".ssh/config"\ | |
".xmonad/xmonad.hs"\ | |
".config/openbox/autostart"\ | |
".config/openbox/environment"\ | |
".config/openbox/menu.xml"\ | |
".config/openbox/rc.xml"\ | |
".config/tint2/tint2rc"\ | |
".config/luakit/globals.lua"\ | |
".config/luakit/rc.lua"\ | |
".config/user-dirs.dirs"\ | |
".config/user-dirs.locale"\ | |
".local/share/luakit/bookmarks"\ | |
".local/share/luakit/proxymenu"\ | |
".mpdscribble/mpdscribble.conf"\ | |
".mutt/aliases"\ | |
".mutt/mailcap"\ | |
"bin"\ | |
".ncmpcpp"\ | |
".pentadactyl/colors"\ | |
".pentadactyl/plugins"\ | |
".psw"\ | |
".local/share/luakit/scripts"\ | |
".thayer-icons"\ | |
) | |
# additional files: | |
# i3status.conf.t520 | |
# parent directories for some configs | |
directories=(\ | |
".i3"\ | |
".irssi"\ | |
".ssh"\ | |
".xmonad"\ | |
".config"\ | |
".config/luakit"\ | |
".config/openbox"\ | |
".config/tint2"\ | |
".local"\ | |
".local/share"\ | |
".local/share/luakit"\ | |
".mpdscribble"\ | |
".mutt"\ | |
".pentadactyl"\ | |
) | |
# create directories if apsent | |
for directory in "${directories[@]}" | |
do | |
if [ ! -d "$HOME/$directory" ]; then | |
mkdir "$HOME/$directory" | |
fi | |
done | |
# create sym link to files, | |
# if link or file in home directory already exists - output filenames | |
exists="" | |
for config in "${configs[@]}" | |
do | |
if [ -a "$HOME/$config" ]; then | |
#rm "$HOME/$config" | |
exists="$exists\n$config" | |
else | |
ln -s "$HOME/.dotfiles/$config" "$HOME/$config" | |
fi | |
done | |
if [ "$exists" ]; then | |
echo "These files are exist already" | |
echo -e $exists | |
fi | |
# clone repository with oh-my-zsh | |
if [ ! -d "$HOME/.oh-my-zsh" ]; then | |
git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh | |
fi | |
# clone repository with vundle | |
if [ ! -d "$HOME/.vim/bundle/vundle" ]; then | |
mkdir $HOME/.vim | |
mkdir $HOME/.vim/bundle | |
git clone https://github.com/gmarik/vundle.git $HOME/.vim/bundle/vundle | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment