shellcheck cleanup and root check

This commit is contained in:
Eric Renfro 2024-06-24 12:52:14 -04:00
parent 71d4868a97
commit 5ae2420df1
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
2 changed files with 14 additions and 4 deletions

View file

@ -1,5 +1,10 @@
#!/bin/bash
if [[ "$(id -u)" -ne 0 ]]; then
echo "ERROR: This needs to be run as root"
exit 250
fi
declare -rA SUBVOLS_DEFAULT=(
["@home"]="home"
["@root"]="root"

View file

@ -1,5 +1,10 @@
#!/bin/bash
if [[ "$(id -u)" -ne 0 ]]; then
echo "ERROR: This needs to be run as root"
exit 250
fi
apt install -y snapper inotify-tools git make systemd-zram-generator btrfsmaintenance axel
bash -c "$(curl -fsSL https://pacstall.dev/q/install)"
@ -27,13 +32,13 @@ snapper -c root set-config 'TIMELINE_LIMIT_YEARLY=0'
snapper -c root create --description "Fresh install"
cd /tmp
cd /tmp || exit 240
git clone https://github.com/Antynea/grub-btrfs.git
cd grub-btrfs
cd grub-btrfs || exit 240
make install
systemctl enable --now grub-btrfsd
update-grub2
cd /tmp
cd /tmp || exit 240
rm -rf grub-btrfs
echo "zram-size = 2048" >> /etc/systemd/zram-generator.conf
@ -41,4 +46,4 @@ echo "compression-algorithm = zstd" >> /etc/systemd/zram-generator.conf
systemctl enable --now btrfs-{scrub,balance,trim}.timer
popd
popd || exit 240