mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-12 22:14:10 +00:00
fix(user-setup): Ensure user always has working justfile
Backs up old file just in case there are user recipes there. Fixes https://github.com/ublue-os/bazzite/issues/186
This commit is contained in:
parent
54907ea905
commit
d39adf72df
@ -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'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user