Skip to content

Commit

Permalink
fix: Make sure files don't exist before copying or symlinking in bazz…
Browse files Browse the repository at this point in the history
…ite-user-setup, allows re-runs without any errors printed.
  • Loading branch information
KyleGospo committed Sep 11, 2023
1 parent 21e05fa commit 24ac50f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ get-boilr:
jq -r ".download_url") \
--create-dirs -o ~/.local/share/icons/hicolor/$px\x$px/apps/io.github.philipk.boilr.png;\
done
mkdir -p $HOME/.local/share/applications
HOME=$HOME
mkdir -p ~/.local/share/applications
echo -e \
"[Desktop Entry]\n\
Version=1.0\n\
Expand Down
24 changes: 18 additions & 6 deletions system_files/desktop/shared/usr/bin/bazzite-user-setup
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then

echo 'Creating Desktop shortcuts'
mkdir -p $HOME/Desktop/
cp /usr/share/applications/steam.desktop $HOME/Desktop/steam.desktop
cp /etc/skel.d/Desktop/Return.desktop $HOME/Desktop/Return.desktop
cp /usr/share/applications/net.lutris.Lutris.desktop $HOME/Desktop/net.lutris.Lutris.desktop
cp /usr/share/applications/yafti.desktop $HOME/Desktop/yafti.desktop
if [[ ! -f "$HOME/Desktop/steam.desktop" ]]; then
cp /usr/share/applications/steam.desktop $HOME/Desktop/steam.desktop
fi
if [[ ! -f "$HOME/Desktop/Return.desktop" ]]; then
cp /etc/skel.d/Desktop/Return.desktop $HOME/Desktop/Return.desktop
fi
if [[ ! -f "$HOME/Desktop/net.lutris.Lutris.desktop" ]]; then
cp /usr/share/applications/net.lutris.Lutris.desktop $HOME/Desktop/net.lutris.Lutris.desktop
fi
if [[ ! -f "$HOME/Desktop/yafti.desktop" ]]; then
cp /usr/share/applications/yafti.desktop $HOME/Desktop/yafti.desktop
fi
fi
else
echo 'Running setup for Silverblue'
Expand All @@ -55,8 +63,12 @@ else

echo 'Installing Gradience presets'
mkdir -p $HOME/.config/presets/user/
ln -s /usr/share/ublue-os/bazzite/themes/vapor.json $HOME/.config/presets/user/vapor.json
ln -s /usr/share/ublue-os/bazzite/themes/vgui2.json $HOME/.config/presets/user/vgui2.json
if [[ ! -f "$HOME/.config/presets/user/vapor.json" ]]; then
ln -s /usr/share/ublue-os/bazzite/themes/vapor.json $HOME/.config/presets/user/vapor.json
fi
if [[ ! -f "$HOME/.config/presets/user/vgui2.json" ]]; then
ln -s /usr/share/ublue-os/bazzite/themes/vgui2.json $HOME/.config/presets/user/vgui2.json
fi

if [[ $IMAGE_NAME =~ "deck" ]]; then
echo 'Running setup for Silverblue on Steam Deck'
Expand Down

0 comments on commit 24ac50f

Please sign in to comment.