♻️ refactor(pacman): branch on render with if/else

- ♻️ follow the repo style instead of exiting early to skip the install block

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
This commit is contained in:
Kros DaiandClaude Opus 5.5 committed 2026-10-08 15:31:04 -04:00
1 parent b381093e32
commit 545190596d
1 file changed
+2 -1
+2 -1
View File
@@ -63,8 +63,8 @@ else
# channel's own mirror stays as the fallback. # channel's own mirror stays as the fallback.
cat "$profile/mirrorlist-$channel.prepend" "$OMARCHY_PATH/default/pacman/mirrorlist-$channel" > "$staging/mirrorlist" cat "$profile/mirrorlist-$channel.prepend" "$OMARCHY_PATH/default/pacman/mirrorlist-$channel" > "$staging/mirrorlist"
fi fi
[[ -z $render_dir ]] || exit 0
if [[ -z $render_dir ]]; then
mkdir -p "$etc/pacman.d" mkdir -p "$etc/pacman.d"
for file in pacman.conf pacman.d/mirrorlist; do for file in pacman.conf pacman.d/mirrorlist; do
if [[ -e $etc/$file ]]; then if [[ -e $etc/$file ]]; then
@@ -74,3 +74,4 @@ done
# Copying over an existing file keeps its owner and mode, as refresh always has. # 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/pacman.conf" "$etc/pacman.conf"
cp -f "$staging/mirrorlist" "$etc/pacman.d/mirrorlist" cp -f "$staging/mirrorlist" "$etc/pacman.d/mirrorlist"
fi