Merge pull request #191 from ublue-os/fix-justfile

fix(user-setup): Ensure user always has working justfile
This commit is contained in:
Kyle Gospodnetich 2023-08-25 08:52:43 -07:00 committed by GitHub
commit 654a7357b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,23 @@
#!/usr/bin/env bash
source /etc/default/bazzite
if [[ -f "${HOME}/.justfile" ]]; then
if grep -Eqvz "main|nvidia|custom" "${HOME}/.justfile"; then
mv "${HOME}/.justfile" "${HOME}/.justfile.old"
cd /usr/share/ublue-os/just
for justfile in *.just; do
echo "!include ${PWD}/${justfile}" >> "${HOME}/.justfile"
done
cd ~
fi
else
cd /usr/share/ublue-os/just
for justfile in *.just; do
echo "!include ${PWD}/${justfile}" >> "${HOME}/.justfile"
done
cd ~
fi
if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
echo 'Running setup for Kinoite'