User

Difference between revisions of "Clément Démoulins"

From LRDE

Line 36: Line 36:
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
apt-get update
 
apt-get update
apt-get install vim-nox htop tree git tmux
+
apt-get install -y vim-nox htop tree git tmux curl
 
mkdir -p /root/.ssh;
 
mkdir -p /root/.ssh;
 
curl http://sao-paulo.lrde.epita.fr/cluster/files/admin-ssh-key.pub -o /root/.ssh/authorized_keys;
 
curl http://sao-paulo.lrde.epita.fr/cluster/files/admin-ssh-key.pub -o /root/.ssh/authorized_keys;

Revision as of 10:56, 15 May 2014

Extraire des sous dossiers d'un dépôt git

Exemple, on veut extraire les papiers de Vaucanson du dépôt commun lrde-publis.

# Clone du dépôt
git clone git@git:lrde-publis.git
git clone --no-hardlinks lrde-publis vcsn-publis
cd vcsn-publis

# Filtre tout sauf ce qui match la pattern : (\.fsmnlp|\.ciaa|\.poosc|\.vaucanson|\.gitignore|\.gitmodules)$
git filter-branch --prune-empty --index-filter "git rm -r --cached --ignore-unmatch $(git log -p | sed -rne 's/^diff --git a\/([^/]+)\/?.* b\/.*$/\1/ p' | sort -u | egrep -v '(\.fsmnlp|\.ciaa|\.poosc|\.vaucanson|\.gitignore|\.gitmodules)$' | xargs echo)" HEAD

# Nettoyage du dépôt
git remote rm origin
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git repack -ad

Compilation dans /lrde/dev

Compilation classique d'un paquet :

source /lrde/dev/profile && ./configure CXXFLAGS="-O3" CFLAGS="-O3" --prefix=/lrde/dev/$(uname -m)/stow/$(basename $PWD) && make && make install

Compilation de gcc :

Commandes bien pratique de post installation

Déploiement de ma config

apt-get update
apt-get install -y vim-nox htop tree git tmux curl
mkdir -p /root/.ssh;
curl http://sao-paulo.lrde.epita.fr/cluster/files/admin-ssh-key.pub       -o /root/.ssh/authorized_keys;
curl http://sao-paulo.lrde.epita.fr/cluster/files/known_hosts             -o /root/.ssh/known_hosts;
curl http://sao-paulo.lrde.epita.fr/cluster/files/id_rsa-dotfiles         -o /root/.ssh/id_rsa-dotfiles;
curl http://sao-paulo.lrde.epita.fr/cluster/files/id_rsa-dotfiles.pub     -o /root/.ssh/id_rsa-dotfiles.pub;
curl http://sao-paulo.lrde.epita.fr/cluster/files/ssh_config              -o /root/.ssh/config;
chmod 600 /root/.ssh/id_rsa-dotfiles;
git clone --quiet dotfiles:clement/dotfiles.git /root/.dotfiles;
(cd /root/.dotfiles && ./install.sh);
chsh root -s /usr/bin/zsh;

Tests