mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-18 02:54:55 +00:00
docs: rm unfullfilled promises of ublue-firstboot
This commit is contained in:
@@ -45,7 +45,7 @@ The `latest` tag will automatically point to the latest build. That build will s
|
|||||||
## Just
|
## Just
|
||||||
|
|
||||||
The `just` task runner is included in main for further customization after first boot.
|
The `just` task runner is included in main for further customization after first boot.
|
||||||
The firstboot script copies the justfile from `/etc/justfile` to your home directory.
|
You can copy the justfile from `/etc/justfile` to `~/.justfile` to get started. Once `just` supports [include directives](https://just.systems/man/en/chapter_52.html), you can just include the file in `/etc` into your own justfile, where you have the option of adding new tasks.
|
||||||
After that run the following commands:
|
After that run the following commands:
|
||||||
|
|
||||||
- `just` - Show all tasks, more will be added in the future
|
- `just` - Show all tasks, more will be added in the future
|
||||||
|
|||||||
@@ -1,99 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if test -e "$HOME"/.config/ublue/firstboot-done; then
|
|
||||||
echo "Already ran"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
(
|
|
||||||
echo "# Waiting for Internet connection"
|
|
||||||
until /usr/bin/ping -q -c 1 flathub.org; do sleep 1; done
|
|
||||||
echo "00"
|
|
||||||
|
|
||||||
echo "# Removing Filtered Flathub Repository"
|
|
||||||
/usr/bin/flatpak remote-delete flathub --force ||:
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Removing Filtered Flathub Repo Failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "3"
|
|
||||||
|
|
||||||
echo "# Enabling Flathub Repository"
|
|
||||||
/usr/bin/flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Adding Flathub Repo Failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "5"
|
|
||||||
|
|
||||||
echo "# Replacing Fedora Flatpaks with Flathub Ones (this may take a while)"
|
|
||||||
/usr/bin/flatpak install --user --noninteractive org.gnome.Platform//43
|
|
||||||
/usr/bin/flatpak install --user --noninteractive --reinstall flathub $(flatpak list --app-runtime=org.fedoraproject.Platform --columns=application | tail -n +1 )
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Replacing Fedora Flatpaks Failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "20"
|
|
||||||
|
|
||||||
echo "Removing all preinstalled Flatpaks"
|
|
||||||
/usr/bin/flatpak remove --system --noninteractive --all ||:
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Removing all preinstalled flatpaks failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "# Removing Fedora Flatpak Repository"
|
|
||||||
/usr/bin/flatpak remote-delete fedora --force ||:
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Removing Fedora Flatpak Repo Failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "25"
|
|
||||||
|
|
||||||
echo "# Installing flatpaks from recipe"
|
|
||||||
flatpaks=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml)
|
|
||||||
flatpaks_count=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml | wc -l)
|
|
||||||
i=0
|
|
||||||
for pkg in $flatpaks; do
|
|
||||||
echo "# Installing ${pkg}"
|
|
||||||
/usr/bin/flatpak install --user --noninteractive flathub $pkg
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Installing ${pkg} Failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
i=$((i+1))
|
|
||||||
# Automatically calculates evenly spaced progess using bc, cuts everything after decimal point.
|
|
||||||
echo "${i}/${flatpaks_count} * (95-30) + 30" | bc -l | cut -d "." -f1
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "Enabling Flatpak auto update"
|
|
||||||
/usr/bin/systemctl --user enable --now flatpak-user-update.timer
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Setting Flatpak Autoupdate Failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "100"
|
|
||||||
|
|
||||||
|
|
||||||
echo "# Reticulating Final Splines"
|
|
||||||
mkdir -p "$HOME"/.config/ublue/
|
|
||||||
touch "$HOME"/.config/ublue/firstboot-done
|
|
||||||
cp -n /etc/justfile "$HOME"/.justfile
|
|
||||||
|
|
||||||
) |
|
|
||||||
|
|
||||||
zenity --progress --title="uBlue Desktop Firstboot" --percentage=0 --auto-close --no-cancel --width=300
|
|
||||||
|
|
||||||
if [ "$?" != 0 ] ; then
|
|
||||||
zenity --error \
|
|
||||||
--text="Firstboot Configuration Error"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user