forked from kageurufu/steamdeck_startup_animations
-
Notifications
You must be signed in to change notification settings - Fork 1
/
update.sh
50 lines (40 loc) · 1.95 KB
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
cd $HOME/homebrew/startup_animations/
if [ -d "$HOME/homebrew/startup_animations/deck_startup/" ]
then
echo ":: Backing up deck_startup/"
mv "$HOME/homebrew/startup_animations/deck_startup/" "$HOME/homebrew/deck_startup_backup"
else
echo "Error: Run Install First."
fi
if [ -d "$HOME/homebrew/startup_animations/deck_suspend/" ]
then
echo ":: Backing up deck_suspend/"
mv "$HOME/homebrew/startup_animations/deck_suspend/" "$HOME/homebrew/deck_suspend_backup"
else
echo "Error: Run Install First."
fi
if [[ ! -d "$HOME/.steam/root/config/uioverrides/movies" ]]; then
echo ":: Making overrides directory $HOME/.steam/root/config/uioverrides/movies"
mkdir -vp "$HOME/.steam/root/config/uioverrides/movies"
fi
echo ":: Pulling Updates..."
git pull --verbose
echo ":: Restoring deck_startup/"
rm -rf "$HOME/homebrew/startup_animations/deck_startup/"
mv "$HOME/homebrew/deck_startup_backup" "$HOME/homebrew/startup_animations/deck_startup/"
echo ":: Restoring deck_suspend/"
rm -rf "$HOME/homebrew/startup_animations/deck_suspend/"
mv "$HOME/homebrew/deck_suspend_backup" "$HOME/homebrew/startup_animations/deck_suspend/"
echo ":: Reinstalling the device startup service"
ln -sf "$HOME/homebrew/startup_animations/randomize_deck_startup.service" "$HOME/.config/systemd/user/randomize_deck_startup.service"
systemctl --user daemon-reload
systemctl --user enable --now randomize_deck_startup.service
echo ":: Reinstalling the desktop startup service"
ln -sf "$HOME/homebrew/startup_animations/randomize_deck_desktop.service" "$HOME/.config/systemd/user/randomize_deck_desktop.service"
systemctl --user daemon-reload
systemctl --user enable --now randomize_deck_desktop.service
echo ":: Reinstalling the suspend service"
ln -sf "$HOME/homebrew/startup_animations/randomize_deck_suspend.service" "$HOME/.config/systemd/user/randomize_deck_suspend.service"
systemctl --user daemon-reload
systemctl --user enable --now randomize_deck_suspend.service