-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiff_custom.sh
More file actions
executable file
·69 lines (56 loc) · 1.76 KB
/
diff_custom.sh
File metadata and controls
executable file
·69 lines (56 loc) · 1.76 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env bash
set -euo pipefail
# This diff script displays the effect of copying the repo files in custom into
# the external locations
cd ~/development/environment
if [ -d project/scripts ] || [ -d custom/scripts ]; then
echo '- custom/scripts:'
delta --diff-so-fancy --pager never \
project/scripts \
custom/scripts || true
fi
if [ -f custom/hosts ]; then
echo '- custom/hosts:'
delta --diff-so-fancy --pager never \
/etc/hosts \
custom/hosts || true
fi
if [ -f custom/ssh_config ]; then
echo '- custom/ssh_config:'
delta --diff-so-fancy --pager never \
~/.ssh/config \
custom/ssh_config || true
fi
echo '- custom/bootstrap:'
# This is a special case to avoid comparing the `.gitignore`
while IFS= read -r FILE_NAME; do
delta --diff-so-fancy --pager never \
"src/scripts/bootstrap/$FILE_NAME" \
"custom/bootstrap/$FILE_NAME" || true
done < <(find custom/bootstrap -type f -print0 | xargs -0 -n1 basename)
echo '- custom/custom.sh:'
delta --diff-so-fancy --pager never \
custom/custom.sh \
src/custom.sh || true
echo '- custom/.vim-custom.lua:'
delta --diff-so-fancy --pager never \
project/.vim-custom.lua \
custom/.vim-custom.lua || true
echo '- custom/vim-macros-custom:'
delta --diff-so-fancy --pager never \
project/vim-macros-custom \
custom/vim-macros-custom || true
echo '- custom/custom_create_vim_snippets.sh:'
delta --diff-so-fancy --pager never \
project/custom_create_vim_snippets.sh \
custom/custom_create_vim_snippets.sh || true
if [ -d ~/development/nix-envs ]; then
echo '- custom/nix-envs:'
delta --diff-so-fancy --pager never \
~/development/nix-envs \
custom/nix-envs/ || true
fi
echo '- custom/.config:'
delta --diff-so-fancy --pager never \
project/.config \
custom/.config || true