From 545190596da340e76a97c3a71a9c675156fbcb8d Mon Sep 17 00:00:00 2001 From: Kros Dai Date: Thu, 8 Oct 2026 15:31:04 -0400 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(pacman):=20branch?= =?UTF-8?q?=20on=20render=20with=20if/else?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - :recycle: follow the repo style instead of exiting early to skip the install block Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g --- bin/omarchy-apply-pacman | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/bin/omarchy-apply-pacman b/bin/omarchy-apply-pacman index 59f41506..5893c80d 100755 --- a/bin/omarchy-apply-pacman +++ b/bin/omarchy-apply-pacman @@ -63,14 +63,15 @@ else # channel's own mirror stays as the fallback. cat "$profile/mirrorlist-$channel.prepend" "$OMARCHY_PATH/default/pacman/mirrorlist-$channel" > "$staging/mirrorlist" fi -[[ -z $render_dir ]] || exit 0 -mkdir -p "$etc/pacman.d" -for file in pacman.conf pacman.d/mirrorlist; do - if [[ -e $etc/$file ]]; then - cp -f "$etc/$file" "$etc/$file.bak" - fi -done -# Copying over an existing file keeps its owner and mode, as refresh always has. -cp -f "$staging/pacman.conf" "$etc/pacman.conf" -cp -f "$staging/mirrorlist" "$etc/pacman.d/mirrorlist" +if [[ -z $render_dir ]]; then + mkdir -p "$etc/pacman.d" + for file in pacman.conf pacman.d/mirrorlist; do + if [[ -e $etc/$file ]]; then + cp -f "$etc/$file" "$etc/$file.bak" + fi + done + # Copying over an existing file keeps its owner and mode, as refresh always has. + cp -f "$staging/pacman.conf" "$etc/pacman.conf" + cp -f "$staging/mirrorlist" "$etc/pacman.d/mirrorlist" +fi