From 5355b3eca27d182c420b8c9bed05a56779491cec Mon Sep 17 00:00:00 2001 From: ange Date: Sat, 25 May 2024 17:29:05 +0200 Subject: [PATCH] fix: echo - outputs - --- config | 4 ++-- modules/chroot/00-bootstrap.sh | 2 +- modules/chroot/20-users.sh | 4 ++-- modules/desktop.sh | 6 +++--- modules/postchroot/99-done.sh | 6 +++--- modules/prechroot/10-disk.sh | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config b/config index b4b72b5..f96573b 100644 --- a/config +++ b/config @@ -10,8 +10,8 @@ disk_passwd=cryptroot swapfile=1024 # MiB username=ange -user_passwd=ange -root_passwd=root +userpasswd=ange +rootpasswd=root shell=zsh diff --git a/modules/chroot/00-bootstrap.sh b/modules/chroot/00-bootstrap.sh index 5a1bcab..a93ea0d 100644 --- a/modules/chroot/00-bootstrap.sh +++ b/modules/chroot/00-bootstrap.sh @@ -11,4 +11,4 @@ locale-gen echo "LANG=$lang.UTF-8" > /etc/locale.conf -echo - "$hostname" > /etc/hostname +echo "$hostname" > /etc/hostname diff --git a/modules/chroot/20-users.sh b/modules/chroot/20-users.sh index 5dcf62b..a119502 100644 --- a/modules/chroot/20-users.sh +++ b/modules/chroot/20-users.sh @@ -4,5 +4,5 @@ shell="$(sed -n "/$shell/{p;q}" /etc/shells)" useradd -mG wheel,video "$username" -s "${shell:-/bin/bash}" -echo "root:$root_passwd" | chpasswd -echo - "$username:$user_passwd" | chpasswd +echo "root:$rootpasswd" | chpasswd +echo "$username:$userpasswd" | chpasswd diff --git a/modules/desktop.sh b/modules/desktop.sh index 792a067..b0cf1e3 100644 --- a/modules/desktop.sh +++ b/modules/desktop.sh @@ -34,10 +34,10 @@ printf '%s\n' \ >> flatpak.txt case "$(lspci | grep 'VGA\|3D')" in - *AMD*) echo vulkan-radeon >> pkglist.txt ;; - *Intel*) echo vulkan-intel >> pkglist.txt ;; + *AMD*) echo vulkan-radeon >> pkglist.txt ;; + *Intel*) echo vulkan-intel >> pkglist.txt ;; *NVIDIA*) echo vulkan-nouveau >> pkglist.txt ;; - *) ;; + *) ;; esac find ./modules/ -name '*.sh.desktop' -exec rename '.desktop' '' '{}' + diff --git a/modules/postchroot/99-done.sh b/modules/postchroot/99-done.sh index 7c13fbc..038cdcb 100644 --- a/modules/postchroot/99-done.sh +++ b/modules/postchroot/99-done.sh @@ -5,11 +5,11 @@ BOLD=$'\e[1m' GREEN=$'\e[32m' NORMAL=$'\e[0m' -echo -e "${BOLD}${GREEN}DONE. Umount? [Y/n]${NORMAL} " && read -r ANS +echo "${BOLD}${GREEN}DONE. Umount? [Y/n]${NORMAL} " && read -r ANS case "$ANS" in - [Yy]*) ;; - *) exit ;; + ''|[Yy]*) ;; + *) exit ;; esac awk '/mnt/ {print $1}' < /proc/swaps | xargs swapoff diff --git a/modules/prechroot/10-disk.sh b/modules/prechroot/10-disk.sh index d77e7d2..e6dccac 100644 --- a/modules/prechroot/10-disk.sh +++ b/modules/prechroot/10-disk.sh @@ -10,7 +10,7 @@ boot=/dev/disk/by-partlabel/boot root=/dev/disk/by-partlabel/root [ -n "$disk_passwd" ] && { - echo -n - "$disk_passwd" | cryptsetup luksFormat "$root" - + echo -n "$disk_passwd" | cryptsetup luksFormat "$root" - cryptsetup open "$root" cryptroot - <<< "$disk_passwd" root=/dev/mapper/cryptroot }