1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 09:15:24 +02:00

[install] Specific settings for my laptop & g5k

This commit is contained in:
Hyacinthe Cartiaux 2014-07-05 18:16:34 +02:00
parent a1537c0963
commit 22b6941d2d

View file

@ -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
)