+++ /dev/null
-#!/bin/bash
-
-set -e
-
-CLONE=/mnt/custom/root
-
-sfdisk -d /dev/sda | sfdisk /dev/sdb
-ls /dev/sd*
-
-mkfs.ext4 /dev/sdb1
-mkfs.ext4 /dev/sdb2
-mkfs.ext4 /dev/sdb5
-mkswap /dev/sdb6
-
-mount /dev/sdb1 $CLONE
-df
-
-rsync -a --one-file-system / $CLONE/
-
-mount /dev/sdb2 $CLONE/home
-mount /dev/sdb5 $CLONE/var
-df
-
-rsync -a /home/ $CLONE/home/
-rsync -a /var/ $CLONE/var/
-
-mount -t proc none $CLONE/proc
-mount -o bind /dev $CLONE/dev
-mount -o bind /sys $CLONE/sys
-
-chroot $CLONE
-
-umount $CLONE/sys
-umount $CLONE/proc
-umount $CLONE/dev
-umount $CLONE/var
-umount $CLONE/home
-umount $CLONE
-
-echo "OK, I'm cloned!"
-
--- /dev/null
+#!/bin/bash
+
+set -e
+
+MASTER=192.168.0.64
+MASTERPATH=/mnt/custom
+NAME=$1
+CLONE=/mnt/$NAME
+
+if [ ! -d $CLONE ]; then
+ mkdir $CLONE
+fi
+
+# CLONING
+mount /dev/sda1 $CLONE
+#df
+echo "rsyncing root..."
+rsync -a --delete --one-file-system $MASTER:$MASTERPATH/ $CLONE/
+
+echo "rsyncing home..."
+mount /dev/sda2 $CLONE/home
+#df
+rsync -a --exclude=/home/telecaster/archives/ --exclude=/home/telecaster/trash/ --exclude=/home/telecaster/test/ $MASTER:$MASTERPATH/home/ $CLONE/home/
+umount $CLONE/home
+
+echo "rsyncing var..."
+mount /dev/sda5 $CLONE/var
+#df
+rsync -a --delete $MASTER:$MASTERPATH/var/ $CLONE/var/
+
+# CHROOT
+mount -t proc none $CLONE/proc
+mount -o bind /dev $CLONE/dev
+mount -o bind /sys $CLONE/sys
+
+chroot $CLONE grub-install /dev/sda
+chroot $CLONE update-grub
+
+umount $CLONE/sys
+umount $CLONE/dev
+umount $CLONE/proc
+
+umount $CLONE/var
+umount $CLONE
+#df
+
+echo "Hello world, I'm an NEW TC clone ! :)"
+
--- /dev/null
+#!/bin/bash
+
+set -e
+
+MASTER=192.168.0.64
+MASTERPATH=/mnt/custom
+NAME=$1
+CLONE=/mnt/$NAME
+
+if [ ! -d $CLONE ]; then
+ mkdir $CLONE
+fi
+
+mount /dev/sda1 $CLONE
+echo "rsyncing root..."
+rsync -a --delete $MASTER:$MASTERPATH/ $CLONE/
+
+echo "rsyncing home..."
+mount /dev/sda3 $CLONE/home
+rsync -a --delete --exclude=/home/telecaster/archives/ --exclude=/home/telecaster/trash/ --exclude=/home/telecaster/test/ $MASTER:$MASTERPATH/home/ $CLONE/home/
+umount $CLONE/home
+
+echo "rsyncing var..."
+rsync -a --delete $MASTER:$MASTERPATH/var/ $CLONE/var/
+
+# CHROOT
+mount -t proc none $CLONE/proc
+mount -o bind /dev $CLONE/dev
+mount -o bind /sys $CLONE/sys
+
+chroot $CLONE grub-install /dev/sda
+chroot $CLONE ls -tl /dev/disk/by-uuid >> /etc/fstab
+chroot $CLONE vi /etc/fstab
+chroot $CLONE grub-install /dev/sda
+chroot $CLONE update-grub
+
+umount $CLONE/sys
+umount $CLONE/dev
+umount $CLONE/proc
+
+#umount $CLONE/var
+umount $CLONE
+
+echo "Hello world, I'm a NEW TC (s10) clone ! :)\nDon't forget to update /etc/fstab in the chroot !"
+
+