From 22b6941d2d785b07b4b79d5ef4de87de49511f6e Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Sat, 5 Jul 2014 18:16:34 +0200 Subject: [PATCH] [install] Specific settings for my laptop & g5k --- install.sh | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index ed2c0e4..6d2e7de 100755 --- a/install.sh +++ b/install.sh @@ -1,9 +1,15 @@ #!/usr/bin/env bash -set -x # Debug +# set -x # Debug +MYLAPTOP=hc-e7440 +MAIL='hyacinthe.cartiaux@free.fr' +PLAN='World domination!' DOTFILES=~/.dotfiles +echo $MAIL > ~/.forward +echo $PLAN > ~/.plan + [[ ! -d ~/.dotfiles ]] && git clone https://github.com/hcartiaux/dotfiles.git $DOTFILES [[ -d ~/.dotfiles ]] && ( cd $DOTFILES ; git pull ) @@ -64,14 +70,6 @@ mkdir -p ~/.rtorrent ln -sf $DOTFILES/git/gitconfig ~/.gitconfig -## wget - -if [[ "`hostname -f | cut -d '.' -f 3`" = "grid5000" ]] ; then - ln -sf $DOTFILES/wget/wgetrc.g5k ~/.wgetrc -else - ln -sf $DOTFILES/wget/wgetrc ~/.wgetrc -fi - ## ssh mkdir -p ~/.ssh/sockets @@ -81,13 +79,6 @@ cat $DOTFILES/ssh/config.* > ~/.ssh/config.perso cat $DOTFILES/ssh/config{,.*} > ~/.ssh/config ) -## aurvote - -[[ -f /etc/arch-release && ! -f ~/.config/aurvote ]] && ( - mkdir -p ~/.config - cp -f $DOTFILES/aurvote ~/.config/aurvote -) - ## RVM configuration ln -sf $DOTFILES/rvm/rvmrc ~/.rvmrc @@ -99,3 +90,29 @@ ln -sf /tmp ~/.cache ln -sf /tmp ~/.macromedia ln -sf /tmp ~/.thumbnails +## wget + +if [[ "`hostname -f | cut -d '.' -f 3`" = "grid5000" ]] ; then + ln -sf $DOTFILES/wget/wgetrc.g5k ~/.wgetrc +else + ln -sf $DOTFILES/wget/wgetrc ~/.wgetrc +fi + + +[[ "$HOST" = "$MYLAPTOP" ]] && ( + + ## G5K + + echo "ssh_config_files: '~/.ssh/config_g5k'" > ~/.net-admin.yaml + touch ~/.password-store + + + ## aurvote + + if [[ -f /etc/arch-release && ! -f ~/.config/aurvote ]]; then + mkdir -p ~/.config + cp -f $DOTFILES/aurvote ~/.config/aurvote + fi + +) +