-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·49 lines (41 loc) · 1.32 KB
/
update.sh
File metadata and controls
executable file
·49 lines (41 loc) · 1.32 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
#!/usr/bin/sh
# @author nate zhou
# @since 2026
# update.sh - update files in damblocks repo
dotfiles="${HOME}/doc/unixchad/dotfiles"
damblocks="${HOME}/doc/unixchad/damblocks"
scripts="audio bright calcurse-num-cron checkupdates-cron dam-run damblocks-mpdd mbs mbs-cron mutt news newsboat-num-cron newsboat-update-cron wobd xobd wttr reload damblocks-kill"
rules="\
99-damblocks-bluetooth.rules \
99-damblocks-usb-audio.rules \
99-damblocks-battery.rules\
"
shells="bash zsh"
update_damblocks() {
cp ${dotfiles}/.local/bin/damblocks ${damblocks}
}
update_bin() {
mkdir -p ${damblocks}/bin
for script in $scripts; do
cp ${dotfiles}/.local/bin/${script} ${damblocks}/bin/
done
}
update_rules() {
mkdir -p ${damblocks}/etc/udev/rules.d
for rules in $rules; do
cp ${dotfiles}/etc/udev/rules.d/$rules \
${damblocks}/etc/udev/rules.d/
done
}
update_cronjobs() {
mkdir -p ${damblocks}/etc
cp ${dotfiles}/.config/crontab.example ${damblocks}/etc/crontab
}
update_completions() {
mkdir -p ${damblocks}/completions
for shell in $shells; do
cp ${dotfiles}/.config/${shell}/completions/_damblocks.${shell} \
${damblocks}/completions/_damblocks.${shell}
done
}
update_damblocks; update_bin; update_rules; update_cronjobs; update_completions