From 007bfb88de4be04ee27f85960fa76735015e0410 Mon Sep 17 00:00:00 2001 From: ange Date: Sat, 18 May 2024 22:02:16 +0200 Subject: [PATCH] feat: hide vars from verbose --- desktop/dwm/install.sh | 6 +++--- desktop/dwm/src/install.sh | 4 +++- desktop/install.sh | 4 ++-- desktop/src/install.sh | 4 +++- dotfiles.sh | 4 ++-- install.sh | 8 +++++--- src/dotfiles.sh | 4 +++- src/install.sh | 4 +++- 8 files changed, 24 insertions(+), 14 deletions(-) diff --git a/desktop/dwm/install.sh b/desktop/dwm/install.sh index 4e303f2..72e0905 100755 --- a/desktop/dwm/install.sh +++ b/desktop/dwm/install.sh @@ -1,8 +1,8 @@ -#!/bin/bash -e +#!/bin/bash cd -- "$(dirname "$0")" . ../../src/lib.sh -cp -rfT rootfs/ /mnt/ -cat config ../../src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex +cp -rfTv rootfs/ /mnt/ +cat config ../../src/lib.sh src/install.sh | arch-chroot /mnt/ bash echo "${BOLD}${GREEN}DONE${NORMAL}" diff --git a/desktop/dwm/src/install.sh b/desktop/dwm/src/install.sh index 0924ef7..6b0174a 100644 --- a/desktop/dwm/src/install.sh +++ b/desktop/dwm/src/install.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/bin/bash + +set -x pac "${pkg[@]}" diff --git a/desktop/install.sh b/desktop/install.sh index 216d9c8..dfb601c 100755 --- a/desktop/install.sh +++ b/desktop/install.sh @@ -1,7 +1,7 @@ -#!/bin/bash -ex +#!/bin/bash cd -- "$(dirname "$0")" . ../src/lib.sh -cat config ../src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex +cat config ../src/lib.sh src/install.sh | arch-chroot /mnt/ bash echo "${BOLD}${GREEN}DONE${NORMAL}" diff --git a/desktop/src/install.sh b/desktop/src/install.sh index d4735a6..25934c7 100644 --- a/desktop/src/install.sh +++ b/desktop/src/install.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/bin/bash + +set -x pac "${pkg[@]}" flatpak xdg-desktop-portal-gtk flatpak install -y "${flatpakpkg[@]}" diff --git a/dotfiles.sh b/dotfiles.sh index cce9493..1e1eb81 100755 --- a/dotfiles.sh +++ b/dotfiles.sh @@ -1,8 +1,8 @@ -#!/bin/bash -ex +#!/bin/bash cd -- "$(dirname "$0")" . ./config . ./src/lib.sh -cat src/dotfiles.sh | arch-chroot /mnt/ su - "$username" -c 'bash -ex' +cat src/dotfiles.sh | arch-chroot /mnt/ su - "$username" -c 'bash' echo "${BOLD}${GREEN}DONE.${NORMAL}" diff --git a/install.sh b/install.sh index 909435c..5e5143b 100755 --- a/install.sh +++ b/install.sh @@ -1,8 +1,9 @@ -#!/bin/bash -ex +#!/bin/bash cd -- "$(dirname "$0")" . ./config . ./src/lib.sh +set -x ( case "$swapfile" in [0-9]*) @@ -24,9 +25,10 @@ cd -- "$(dirname "$0")" ) pacstrap -C rootfs/etc/pacman.conf -K /mnt/ --needed "${pkg[@]}" -cp -rfT rootfs/ /mnt/ +cp -rfTv rootfs/ /mnt/ genfstab -U /mnt/ >> /mnt/etc/fstab +swapoff /mnt/swapfile -cat config src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex +cat config src/lib.sh src/install.sh | arch-chroot /mnt/ bash echo "${BOLD}${GREEN}DONE${NORMAL}" diff --git a/src/dotfiles.sh b/src/dotfiles.sh index ec844b5..cb54afa 100644 --- a/src/dotfiles.sh +++ b/src/dotfiles.sh @@ -1,9 +1,11 @@ -#!/bin/bash -ex +#!/bin/bash cd config=(git --git-dir "$HOME/.dotfiles" --work-tree "$HOME") repo='https://git.maby.dev/ange/.dotfiles.git' +set -x + git clone --bare "$repo" "$HOME/.dotfiles" "${config[@]}" checkout -f diff --git a/src/install.sh b/src/install.sh index e34cf9c..4343a54 100644 --- a/src/install.sh +++ b/src/install.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/bin/bash + +set -x # System config ln -sf "/usr/share/zoneinfo/$tz" /etc/localtime