Skip to content

Commit

Permalink
Merge branch 'main' into kernel-unpin
Browse files Browse the repository at this point in the history
  • Loading branch information
inffy authored Feb 3, 2025
2 parents 1aad702 + 69ed7fa commit 3b5d66d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
7 changes: 7 additions & 0 deletions build_files/base/18-workarounds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ fi
mkdir -p /usr/share/ublue-os/aurora-cli
cp /usr/share/ublue-os/bling/* /usr/share/ublue-os/aurora-cli

# Copy flatpak list on image to compare against it on boot wo/ requiring curl to gh
FLATPAK_LIST=($(cat /ctx/aurora_flatpaks/flatpaks))
if [[ ${IMAGE_NAME} =~ "dx" ]]; then
FLATPAK_LIST+=($(cat /ctx/dx_flatpaks/flatpaks))
fi
printf "%s\n" "${FLATPAK_LIST[@]}" > /usr/share/ublue-os/flatpak_list

echo "::endgroup::"
37 changes: 21 additions & 16 deletions just/aurora-system.just
Original file line number Diff line number Diff line change
Expand Up @@ -216,27 +216,32 @@ configure-vfio ACTION="":
[group('System')]
[private]
install-system-flatpaks CURR_LIST_FILE="":
#!/usr/bin/bash
#!/usr/bin/env bash
CURR_LIST_FILE={{ CURR_LIST_FILE }}
IMAGE_NAME=$(jq -r '."image-name"' < "/usr/share/ublue-os/image-info.json")
FLATPAK_LIST="$(curl https://raw.githubusercontent.com/ublue-os/aurora/main/aurora_flatpaks/flatpaks | tr '\n' ' ')"
flatpak --system -y install --or-update ${FLATPAK_LIST}
if [[ ${IMAGE_NAME} =~ "dx" ]]; then
DX_FLATPAKS="$(curl https://raw.githubusercontent.com/ublue-os/aurora/main/dx_flatpaks/flatpaks | tr '\n' ' ')"
FLATPAK_LIST="${FLATPAK_LIST} ${DX_FLATPAKS}"
fi
if [[ -n ${CURR_LIST_FILE} ]]; then
CURRENT_FLATPAK_LIST=$(cat "${CURR_LIST_FILE} 2>/dev/null")
# get flatpaks that are in FLATPAK_LIST but not in CURRENT_FLATPAK_LIST
NEW_FLATPAKS=$(comm -23 <(sort "${FLATPAK_LIST}") <(sort "${CURRENT_FLATPAK_LIST}"))
if [[ -n ${NEW_FLATPAKS} ]]; then
flatpak --system -y install --or-update ${NEW_FLATPAKS}
echo "${FLATPAK_LIST}" > "${CURR_LIST_FILE}"
FLATPAK_LIST=($(cat /usr/share/ublue-os/flatpak_list))
if [[ -f "${CURR_LIST_FILE}" ]]; then
mapfile -t CURRENT_FLATPAK_LIST < "${CURR_LIST_FILE}"
# convert arrays to sorted newline-separated strings to compare lists and get new flatpaks
NEW_FLATPAKS=($(comm -23 <(printf "%s\n" "${FLATPAK_LIST[@]}" | sort) <(printf "%s\n" "${CURRENT_FLATPAK_LIST[@]}" | sort)))
if [[ ${#NEW_FLATPAKS[@]} -gt 0 ]]; then
flatpak --system -y install --or-update "${NEW_FLATPAKS[@]}"
printf "%s\n" "${FLATPAK_LIST[@]}" > "${CURR_LIST_FILE}"
notify-send "Welcome to Aurora" "New flatpak apps have been installed!" --app-name="Flatpak Manager Service" -u NORMAL
fi
else
printf "%s\n" "${FLATPAK_LIST[@]}" > "${CURR_LIST_FILE}"
flatpak --system -y install --or-update "${FLATPAK_LIST[@]}"
fi
else
flatpak --system -y install --or-update ${FLATPAK_LIST}
IMAGE_NAME=$(jq -r '."image-name"' < "/usr/share/ublue-os/image-info.json")
FLATPAK_LIST=($(curl https://raw.githubusercontent.com/ublue-os/aurora/main/aurora_flatpaks/flatpaks))
if [[ ${IMAGE_NAME} =~ "dx" ]]; then
FLATPAK_LIST+=($(curl https://raw.githubusercontent.com/ublue-os/aurora/main/dx_flatpaks/flatpaks))
fi
flatpak --system -y install --or-update "${FLATPAK_LIST[@]}"
fi
# Configure grub bootmenu visibility
Expand Down

0 comments on commit 3b5d66d

Please sign in to comment.