New install script.

This commit is contained in:
Julien Palard 2015-11-28 18:12:40 +01:00
parent e1c3061bd2
commit 6589b5c869
2 changed files with 3 additions and 26 deletions

3
add.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
rsync -bahv ./ ~/

26
all.sh
View File

@ -1,26 +0,0 @@
#!/bin/sh
# wget -qO- dotfiles.mandark.fr/all | sh
backup_directory="$(date +%Y-%m-%d-%H:%M:%S)"
mkdir -p ~/$backup_directory
for file in emacs bashrc Xresources gitconfig screenrc rc.xml
do
case $file in
rc.xml)
if [ -d ~/.config/openbox/ ]
then
[ -f ~/.config/openbox/rc.xml ] && mv ~/.config/openbox/rc.xml ~/$backup_directory/
wget -qO ~/.config/openbox/rc.xml mandark.fr/dotfiles/$file
fi
;;
*)
[ -f ~/.$file ] && mv ~/.$file ~/$backup_directory/
wget -qO ~/.$file mandark.fr/dotfiles/$file
;;
esac
done
echo "Your old files are in ~/$backup_directory"