mirror of
https://github.com/get-aurora-dev/common.git
synced 2026-11-03 21:49:43 -09:00
30 lines
1 KiB
Bash
Executable file
30 lines
1 KiB
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
# Script Version
|
|
VER=2
|
|
LOCAL_UBLUE_DIR="${XDG_DATA_HOME:-${HOME}/.local/share}/ublue"
|
|
VER_FILE="${LOCAL_UBLUE_DIR}/flatpak_manager_version"
|
|
VER_RAN=$(cat "$VER_FILE")
|
|
|
|
mkdir -p "${LOCAL_UBLUE_DIR}" || exit 1
|
|
|
|
# Install flatpaks if the list has been updated
|
|
ujust install-system-flatpaks "${LOCAL_UBLUE_DIR}/flatpak_current_list"
|
|
|
|
# Run script if updated
|
|
if [[ -f $VER_FILE && $VER = "$VER_RAN" ]]; then
|
|
echo "Flatpak manager v$VER has already ran. Exiting..."
|
|
exit 0
|
|
fi
|
|
|
|
# Set up Firefox default configuration
|
|
mkdir -p /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/$(arch)/stable/defaults/pref
|
|
rm -f /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/$(arch)/stable/defaults/pref/*aurora*.js
|
|
/usr/bin/cp -rf /usr/share/ublue-os/firefox-config/* /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/$(arch)/stable/defaults/pref/
|
|
|
|
# Use until yafti rework is done
|
|
flatpak --system update -y
|
|
|
|
notify-send "Welcome to Aurora" "Your computer is ready!" --app-name="Flatpak Manager Service" -u NORMAL
|
|
|
|
echo $VER >"$VER_FILE"
|