-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiff-files
executable file
·31 lines (28 loc) · 1.11 KB
/
diff-files
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
29
30
31
#!/bin/sh
# Script by Ypnose - http://ywstd.fr
diff_found() {
if [ -f "$1" ]; then diff -u "$1" "$2"; fi
}
find . -maxdepth 1 -type f | sort | while IFS= read -r FILE; do
diff_found "${HOME}/.${FILE##*/}" "$FILE"
done
if [ -f "${HOME}/.ssh/config" ]; then
(
CONFIG_LINES="$(awk 'END{print NR}' misc/sshconfig)"
head -n"$CONFIG_LINES" "${HOME}/.ssh/config" \
| diff -u - misc/sshconfig
)
fi
diff_found "${HOME}/.gnupg/gpg.conf" gpg/gpg.conf
diff_found "${HOME}/.gnupg/gpg-agent.conf" gpg/gpg-agent.conf
diff_found "${HOME}/.config/fontconfig/fonts.conf" misc/fonts/fonts.conf
diff_found "${HOME}/.config/foot/foot.ini" gui/foot.ini
diff_found "${HOME}/.config/gtk-3.0/settings.ini" misc/fonts/settings.ini
diff_found "${HOME}/.config/git/config" misc/gitconfig
diff_found "${HOME}/.config/alacritty/alacritty.toml" gui/alacritty.toml
diff_found "${HOME}/.config/i3/config" gui/i3config
diff_found "${HOME}/.config/imv/config" gui/imvconfig
diff_found "${HOME}/.config/mpv/input.conf" gui/mpvinput.conf
diff_found "${HOME}/.config/sway/config" gui/swayconfig
diff_found "${HOME}/.config/tmux/tmux.conf" misc/tmuxconf
exit