blob: c06d497ab15e704078c92d218b591897b7348c1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#! /bin/bash
dotdir=/home/urbain/dotfiles
install_dotfiles() {
for file in `ls -A --ignore="install.sh" --ignore="README.md" --ignore=".git*"`; do
if [[ -f $file/Makefile ]]; then
cd $file && make && cd $dotdir
else
rm -f $HOME/$file && ln -s $dotdir/$file $HOME/$file
fi
done
}
clean_dotfiles() {
for file in `ls -A --ignore="install.sh" --ignore="README.md" --ignore=".git*"`; do
if [[ -f $file/Makefile ]]; then
cd $file && make clean && cd $dotdir
else
rm -f $HOME/$file
fi
done
}
clean_dotfiles
install_dotfiles
|