gnome-branding-Aeon/aeon-firstboot
Richard Brown f11a992f6d Accepting request 1135493 from home:dopice:branches:devel:microos:aeon
Changed the online check from using ping to cURL. Since Flatpak uses https to download the packages, I believe the online check should use the same method. I discovered this when installing a new computer in a network which have restricted outbouond ICMP.

OBS-URL: https://build.opensuse.org/request/show/1135493
OBS-URL: https://build.opensuse.org/package/show/devel:microos:aeon/gnome-branding-Aeon?expand=0&rev=14
2024-01-02 08:40:15 +00:00

61 lines
1.6 KiB
Bash

#!/bin/sh
(
echo "# Waiting for Internet connection"
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done
echo "10"
echo "# Adding Flathub Repository"
/usr/bin/flatpak remote-add --user --if-not-exists flathub /usr/share/aeon/flathub.flatpakrepo
if [ "$?" != 0 ] ; then
zenity --error \
--text="Adding Flathub Repo Failed"
exit 1
fi
echo "20"
echo "# Installing Firefox"
/usr/bin/flatpak install --user --noninteractive flathub org.mozilla.firefox
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Firefox Failed"
exit 1
fi
echo "40"
echo "# Installing Calculator"
/usr/bin/flatpak install --user --noninteractive flathub org.gnome.Calculator
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Calculator Failed"
exit 1
fi
echo "60"
echo "# Installing Text Editor"
/usr/bin/flatpak install --user --noninteractive flathub org.gnome.TextEditor
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Text Editor Failed"
exit 1
fi
echo "80"
echo "# Installing Extension Manager"
/usr/bin/flatpak install --user --noninteractive flathub com.mattjakeman.ExtensionManager
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Extension Manager Failed"
exit 1
fi
echo "100"
echo "# Cleaning up"
rm ~/.config/autostart/aeon-firstboot.desktop
) |
zenity --progress --title="Aeon Firstboot" --percentage=0 --auto-close --no-cancel --width=300
if [ "$?" != 0 ] ; then
zenity --error \
--text="Firstboot Configuration Error"
fi