David Blume commited on 2018-01-02 17:15:51
Showing 1 changed files, with 7 additions and 2 deletions.
... | ... |
@@ -27,8 +27,8 @@ do |
27 | 27 |
esac |
28 | 28 |
done |
29 | 29 |
|
30 |
-if [ ! -d $backup_dir ]; then |
|
31 |
- ((DRY_RUN==0)) && mkdir -p $backup_dir |
|
30 |
+if [ ! -d $backup_dir/.ssh ]; then |
|
31 |
+ ((DRY_RUN==0)) && mkdir -p $backup_dir/.ssh |
|
32 | 32 |
fi |
33 | 33 |
|
34 | 34 |
# Move original dot files to backup |
... | ... |
@@ -43,7 +43,12 @@ do |
43 | 43 |
# Consider using symbolic links instead |
44 | 44 |
# so pulling updates automatically apply |
45 | 45 |
cp "$i" $HOME/"$i" |
46 |
+ echo "# vimdiff \"$HOME/$i\" \"$backup_dir/$i\"" |
|
47 |
+ else |
|
48 |
+ # Provide a diff that can still be used |
|
49 |
+ echo "# vimdiff \"$i\" \"$HOME/$i\"" |
|
46 | 50 |
fi |
51 |
+ echo |
|
47 | 52 |
else |
48 | 53 |
echo No change to "$i". |
49 | 54 |
fi |
50 | 55 |