classy-giraffe / easy-arch

Script for boostrapping Arch Linux with BTRFS, snapshots and LUKS encryption (UEFI only).
https://classy-giraffe.github.io/easy-arch
Apache License 2.0
237 stars 54 forks source link

Inprovements #47

Closed i-c-u-p closed 2 years ago

i-c-u-p commented 2 years ago

There's several changes, but the main ones are:

classy-giraffe commented 2 years ago

I don't mind the changes you've done but I got a few requests: 1) Could you please make sure the code pass the checks? (It's just a bash syntax checker that make sure that you're using solid techniques while writing scripts) 2) The part where you change the parameters for grub should not be touched as I use a systemd based initramfs (that's why I need "rd.") and yes despite systemd being able to find stuff on its own, I've read somewhere that specifying parameters make the boot process faster. Thank you as always! 💗

i-c-u-p commented 2 years ago

The part where you change the parameters for grub should not be touched

It should be fixed now, I made a mistake when trying to shorten the command using & (for &'s meaning in sed see this) that caused the line to become GRUB_CMDLINE_LINUX="<options>"". Although in the way I was trying to do it, it would've matched GRUB_CMDLINE_LINUX= with 1 quote after it instead of two so I changed it a bit more to match 2 while still being short, but if it only needs to match 1 it can be shorter: s,^GRUB_CMDLINE_LINUX=\",&rd.luks.name=$UUID=cryptroot root=$BTRFS, than the current expression (if it's cryptic, see GNU sed manual sections 4.1 & 4.3 for info): \,^GRUB_CMDLINE_LINUX=\"\",s,\",&rd.luks.name=$UUID=cryptroot root=$BTRFS,

classy-giraffe commented 2 years ago

I'm at school right now, if you can assure me the script works flawlessly, I'll be accepting the PR. Or if you prefer, I can wait till i get home, and test it myself. As you wish, let me know! 😝

i-c-u-p commented 2 years ago

I'm at school right now, if you can assure me the script works flawlessly, I'll be accepting the PR. Or if you prefer, I can wait till i get home, and test it myself. As you wish, let me know! stuck_out_tongue_closed_eyes

It'd be better for you to test it at home as I made a lot of changes (some incorrectly at first which had to be fixed later, as you can tell from the commit titles & messages).

classy-giraffe commented 2 years ago

image

Not a sed expert can we try to fix this cause the Github Actions failing is bothering me 😭

i-c-u-p commented 2 years ago

Not a sed expert can we try to fix this cause the Github Actions failing is bothering me sob

Bash parameter expansion doesn't seem to support backreferences so I don't know how to remove sed from that one.