Skip to content

Commit 5e608f8

Browse files
authored
Merge pull request #309 from yarikoptic/enh-codespell
Add codespell support (config, workflow to alert on new typos) + make it fix typos
2 parents 490720a + 4ff8235 commit 5e608f8

File tree

10 files changed

+51
-23
lines changed

10 files changed

+51
-23
lines changed

.codespellrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[codespell]
2+
skip = .git,*.pdf,*.svg,go.sum,.codespellrc
3+
check-hidden = true
4+
# ignore-regex =
5+
# ist -- unfortunate variable
6+
ignore-words-list = ist

.github/workflows/codespell.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Codespell
3+
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
branches: [master]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
codespell:
15+
name: Check for spelling errors
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
- name: Codespell
22+
uses: codespell-project/actions-codespell@v2

41_snapshots-btrfs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ if [ -n "${GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS}" ] ; then
108108
protection_authorized_users="--users ${GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS} "
109109
fi
110110

111-
## Probe informations of Root and Boot devices
111+
## Probe information of Root and Boot devices
112112
# Probe info "Root partition"
113113
root_device=$(${grub_probe} --target=device /) # Root device
114114
root_uuid=$(${grub_probe} --device ${root_device} --target="fs_uuid" 2>/dev/null) # UUID of the root device
@@ -174,7 +174,7 @@ if [[ -d "$grub_btrfs_mount_point" ]]; then
174174
done
175175
if [[ "$wait" != true ]]; then
176176
if ! rm -d "$grub_btrfs_mount_point" >/dev/null 2>&1; then
177-
printf "Unable to delete %s: Device or ressource is busy\n" "$grub_btrfs_mount_point" >&2;
177+
printf "Unable to delete %s: Device or resource is busy\n" "$grub_btrfs_mount_point" >&2;
178178
fi
179179
fi
180180
fi
@@ -315,7 +315,7 @@ snapshot_list()
315315
fi
316316
[[ ! -d "$grub_btrfs_mount_point/$path_snapshot/boot" ]] && continue; # Discard snapshots without /boot folder
317317

318-
# Parse Snapper & timeshift informations
318+
# Parse Snapper & timeshift information
319319
local type_snapshot="N/A"
320320
local description_snapshot="N/A"
321321
if [[ -s "$grub_btrfs_mount_point/${path_snapshot%"/"*}/$snapper_info" ]] ; then

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ help:
147147
@echo " BOOT_DIR_FEDORA | path | boot data location (Fedora, RHEL, CentOS, Rocky...) | '/boot/grub2'"
148148
@echo " SHARE_DIR | path | shared data location | '\$$(DESTDIR)\$$(PREFIX)/share'"
149149
@echo " LIB_DIR | path | system libraries location | '\$$(DESTDIR)\$$(PREFIX)/lib'"
150-
@echo " PKGNAME | name | name of the ditributed package | 'grub-btrfs'"
150+
@echo " PKGNAME | name | name of the distributed package | 'grub-btrfs'"
151151
@echo " INITCPIO | bool | include mkinitcpio hook | false"
152152
@echo " SYSTEMD | bool | include unit files | true"
153153
@echo " OPENRC | bool | include OpenRc daemon | false"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ To manually generate grub snapshot entries you can run `sudo /etc/grub.d/41_snap
7575
* On **Fedora** use `grub2-mkconfig -o /boot/grub2/grub.cfg`
7676
* On **Debian and Ubuntu based** distributions `update-grub` is a script that runs `grub-mkconfig ...`
7777

78-
This process can be automated to occur whenever you create or delete snaphots but this process is slightly different depending upon your distributions choice on init system. See the relevant instructions for your init system below.
78+
This process can be automated to occur whenever you create or delete snapshots but this process is slightly different depending upon your distributions choice on init system. See the relevant instructions for your init system below.
7979

8080
### ⚙️ Customization:
8181

config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ GRUB_BTRFS_VERSION=4.12-master-2023-04-28T16:26:00+00:00
4949
# Default: ("")
5050
#GRUB_BTRFS_CUSTOM_MICROCODE=("custom-ucode.img" "custom-uc.img "custom_ucode.cpio")
5151

52-
# Additonal kernel command line parameters that should be passed to the kernel
52+
# Additional kernel command line parameters that should be passed to the kernel
5353
# when booting a snapshot.
5454
# For dracut based distros this could be useful to pass "rd.live.overlay.overlayfs=1"
5555
# or "rd.live.overlay.readonly=1" to the Kernel for booting snapshots read only.
5656
# Default: ""
5757
#GRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS="rd.live.overlay.overlayfs=1"
5858

59-
# Comma seperated mount options to be used when booting a snapshot.
59+
# Comma separated mount options to be used when booting a snapshot.
6060
# They can be defined here as well as in the "/" line inside the respective snapshots'
6161
# "/etc/fstab" files. Mount options found in both places are combined, and this variable
6262
# takes priority over `fstab` entries.
@@ -107,14 +107,14 @@ GRUB_BTRFS_IGNORE_PREFIX_PATH=("var/lib/docker" "@var/lib/docker" "@/var/lib/doc
107107

108108
# Location where grub-btrfs.cfg should be saved.
109109
# Some distributions (like OpenSuSE) store those files at the snapshot directory
110-
# instead of boot. Be aware that this direcory must be available for grub during
110+
# instead of boot. Be aware that this directory must be available for grub during
111111
# startup of the system.
112112
# Default: $GRUB_BTRFS_GRUB_DIRNAME
113113
#GRUB_BTRFS_GBTRFS_DIRNAME="/boot/grub"
114114

115115
# Location of the directory where Grub searches for the grub-btrfs.cfg file.
116116
# Some distributions (like OpenSuSE) store those file at the snapshot directory
117-
# instead of boot. Be aware that this direcory must be available for grub during
117+
# instead of boot. Be aware that this directory must be available for grub during
118118
# startup of the system.
119119
# Default: "\${prefix}" # This is a grub variable that resolves to where grub is
120120
# installed. (like /boot/grub, /boot/efi/grub)

grub-btrfsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ setup() {
204204
}
205205

206206
create_grub_menu() {
207-
# create the grub submenu of the whole grub menu, depending on wether the submenu already exists
207+
# create the grub submenu of the whole grub menu, depending on whether the submenu already exists
208208
# and gives feedback if it worked
209209
if grep "snapshots-btrfs" "${GRUB_BTRFS_GRUB_DIRNAME:-/boot/grub}"/grub.cfg; then
210210
if /etc/grub.d/41_snapshots-btrfs; then
@@ -258,7 +258,7 @@ daemon_function() {
258258
set_snapshot_dir
259259
log "${BASHPID}: detected Timeshift startup, PID is: $timeshift_pid" "${CYAN}"
260260
vlog "${BASHPID}: new snapshots directory is $snapdir" "${CYAN}"
261-
(create_grub_menu) # create the grub menu once immidiatly in a forking process. Snapshots from commandline using timeshift --create need this
261+
(create_grub_menu) # create the grub menu once immediately in a forking process. Snapshots from commandline using timeshift --create need this
262262
}
263263
fi
264264
runs=false

manpages/grub-btrfs.8.man

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Example: \fCGRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="false"\fP
8282

8383
.SS "\fCGRUB_BTRFS_ROOTFLAGS\fP"
8484
.PP
85-
Comma seperated mount options to be used when booting a snapshot.
85+
Comma separated mount options to be used when booting a snapshot.
8686
They can be defined here as well as in the “/” line inside the respective snapshots’
8787
“/etc/fstab” files. Mount options found in both places are combined, and this variable
8888
takes priority over `fstab` entries.
@@ -116,7 +116,7 @@ Example: \fCGRUB_BTRFS_NKERNEL=("kernel\-5.19.4\-custom" "vmlinux\-5.19.4\-custo
116116

117117
.SS "\fCGRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS\fP"
118118
.PP
119-
Additonal kernel command line parameters that should be passed to the kernelwhen
119+
Additional kernel command line parameters that should be passed to the kernelwhen
120120
booting a snapshot.
121121
For dracut based distros this could be useful to pass “rd.live.overlay.overlayfs=1”
122122
or “rd.live.overlay.readonly=1” to the Kernel for booting read only snapshots.
@@ -190,7 +190,7 @@ Example: \fCGRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"\fP
190190
.PP
191191
Location where grub-btrfs.cfg should be saved.
192192
Some distributions (like OpenSuSE) store those file at the snapshot directory
193-
instead of boot. Be aware that this direcory must be available for grub during
193+
instead of boot. Be aware that this directory must be available for grub during
194194
startup of the system.
195195
.IP \(em 4
196196
Default: \fC$GRUB_BTRFS_GRUB_DIRNAME\fP
@@ -201,7 +201,7 @@ Example: \fCGRUB_BTRFS_GBTRFS_DIRNAME="/.snapshots"\fP
201201
.PP
202202
Location of the directory where Grub searches for the grub-btrfs.cfg file.
203203
Some distributions (like OpenSuSE) store those file at the snapshot directory
204-
instead of boot. Be aware that this direcory must be available for grub during
204+
instead of boot. Be aware that this directory must be available for grub during
205205
startup of the system.
206206
.IP \(em 4
207207
Default: “\${prefix}” (This is a grub variable that resolves to where grub is

manpages/grub-btrfs.8.org

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Show snapshots found during run "grub-mkconfig"
5858
- Example: ~GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="false"~
5959

6060
*** ~GRUB_BTRFS_ROOTFLAGS~
61-
Comma seperated mount options to be used when booting a snapshot.
61+
Comma separated mount options to be used when booting a snapshot.
6262
They can be defined here as well as in the "/" line inside the respective snapshots'
6363
"/etc/fstab" files. Mount options found in both places are combined, and this variable
6464
takes priority over `fstab` entries.
@@ -84,7 +84,7 @@ Customs kernel, initramfs and microcodes that are not detected can be added in t
8484
~GRUB_BTRFS_CUSTOM_MICROCODE=("custom-ucode.img" "custom-uc.img "custom_ucode.cpio")~
8585

8686
*** ~GRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS~
87-
Additonal kernel command line parameters that should be passed to the kernelwhen
87+
Additional kernel command line parameters that should be passed to the kernelwhen
8888
booting a snapshot.
8989
For dracut based distros this could be useful to pass "rd.live.overlay.overlayfs=1"
9090
or "rd.live.overlay.readonly=1" to the Kernel for booting read only snapshots.
@@ -139,15 +139,15 @@ For example, on Fedora with EFI : "/boot/efi/EFI/fedora"
139139
*** ~GRUB_BTRFS_GBTRFS_DIRNAME~
140140
Location where grub-btrfs.cfg should be saved.
141141
Some distributions (like OpenSuSE) store those file at the snapshot directory
142-
instead of boot. Be aware that this direcory must be available for grub during
142+
instead of boot. Be aware that this directory must be available for grub during
143143
startup of the system.
144144
- Default: ~$GRUB_BTRFS_GRUB_DIRNAME~
145145
- Example: ~GRUB_BTRFS_GBTRFS_DIRNAME="/.snapshots"~
146146

147147
*** ~GRUB_BTRFS_GBTRFS_SEARCH_DIRNAME~
148148
Location of the directory where Grub searches for the grub-btrfs.cfg file.
149149
Some distributions (like OpenSuSE) store those file at the snapshot directory
150-
instead of boot. Be aware that this direcory must be available for grub during
150+
instead of boot. Be aware that this directory must be available for grub during
151151
startup of the system.
152152
- Default: "\${prefix}" (This is a grub variable that resolves to where grub is
153153
installed. (like /boot/grub, /boot/efi/grub))

temp/grub-btrfs.8

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Example: \fCGRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="false"\fP
8282

8383
.SS "\fCGRUB_BTRFS_ROOTFLAGS\fP"
8484
.PP
85-
Comma seperated mount options to be used when booting a snapshot.
85+
Comma separated mount options to be used when booting a snapshot.
8686
They can be defined here as well as in the “/” line inside the respective snapshots’
8787
“/etc/fstab” files. Mount options found in both places are combined, and this variable
8888
takes priority over `fstab` entries.
@@ -116,7 +116,7 @@ Example: \fCGRUB_BTRFS_NKERNEL=("kernel\-5.19.4\-custom" "vmlinux\-5.19.4\-custo
116116

117117
.SS "\fCGRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS\fP"
118118
.PP
119-
Additonal kernel command line parameters that should be passed to the kernelwhen
119+
Additional kernel command line parameters that should be passed to the kernelwhen
120120
booting a snapshot.
121121
For dracut based distros this could be useful to pass “rd.live.overlay.overlayfs=1”
122122
or “rd.live.overlay.readonly=1” to the Kernel for booting read only snapshots.
@@ -190,7 +190,7 @@ Example: \fCGRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"\fP
190190
.PP
191191
Location where grub-btrfs.cfg should be saved.
192192
Some distributions (like OpenSuSE) store those file at the snapshot directory
193-
instead of boot. Be aware that this direcory must be available for grub during
193+
instead of boot. Be aware that this directory must be available for grub during
194194
startup of the system.
195195
.IP \(em 4
196196
Default: \fC$GRUB_BTRFS_GRUB_DIRNAME\fP
@@ -201,7 +201,7 @@ Example: \fCGRUB_BTRFS_GBTRFS_DIRNAME="/.snapshots"\fP
201201
.PP
202202
Location of the directory where Grub searches for the grub-btrfs.cfg file.
203203
Some distributions (like OpenSuSE) store those file at the snapshot directory
204-
instead of boot. Be aware that this direcory must be available for grub during
204+
instead of boot. Be aware that this directory must be available for grub during
205205
startup of the system.
206206
.IP \(em 4
207207
Default: “\${prefix}” (This is a grub variable that resolves to where grub is

0 commit comments

Comments
 (0)