Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions os-init/cachyos-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ D_LOC="${D_LOC:?D_LOC must be set}"
sudo -v

prompt() {
local available=$(($(tput cols) - ${#1} - 2))
local left=$((available / 2))
local right=$((available - left))
local available=$(($(tput cols) - ${#1} - 2))
local left=$((available / 2))
local right=$((available - left))

test $left -gt 0 && printf -- "=%.0s" $(seq 1 $left)
printf " %s " "$1"
test $right -gt 0 && printf -- "=%.0s" $(seq 1 $right)
echo ""
test $left -gt 0 && printf -- "=%.0s" $(seq 1 $left)
printf " %s " "$1"
test $right -gt 0 && printf -- "=%.0s" $(seq 1 $right)
echo ""
}

prompt "system package installations"
PACKAGES=(fd eza ripgrep sd dust clang shellcheck typst openssh gcc cmake curl fontconfig p7zip)
PACKAGES=(fd eza ripgrep sd dust clang shellcheck typst openssh gcc cmake curl fontconfig p7zip unzip)
if [[ -z "${DOTFILES_SKIP_UPDATE:-}" ]]; then
sudo pacman -Syu --noconfirm
sudo pacman -Syu --noconfirm
fi
sudo pacman -S --needed --noconfirm --ask=4 "${PACKAGES[@]}" 2>&1 | { grep -Ev 'is up to date -- skipping|there is nothing to do' || true; }