Skip to content

Commit

Permalink
fix(user-setup): Ensure user always has working justfile
Browse files Browse the repository at this point in the history
Backs up old file just in case there are user recipes there. Fixes #186
  • Loading branch information
EyeCantCU authored Aug 25, 2023
1 parent 54907ea commit d39adf7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions system_files/desktop/shared/usr/bin/bazzite-user-setup
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit d39adf7

Please sign in to comment.