update and refresh

This commit is contained in:
2026-08-14 05:45:29 -06:00
parent cc7243aa39
commit 013acac303
7 changed files with 31 additions and 16 deletions
Executable
+48
View File
@@ -0,0 +1,48 @@
#!/bin/bash
# Print the logo
print_logo() {
cat << "EOF"
██
█ ██
██ ██████ █████ ██ █████ █████ ████ ██ █████ ██
██ ██ ██ ███ ███████ ██ ██ ██ ██ ██ ████████ ██ ██ ███████
█████ ██████ ██ ██ ██████ ██ ████████ ██ █ ███████ ██ ██
██ ██████ ███████ ██████ ██ ██████ ██████ ██████ ███████
EOF
}
# Clear screen and show logo
clear
print_logo
COREDESKTOP="$HOME/.local/share/coredesktop"
echo "Updating CoreDesktop..."
git -C "$COREDESKTOP" pull
mkdir -p "$COREDESKTOP/updates.d"
sudo cp "$COREDESKTOP/update" ~/.local/bin/update
sudo cp "$COREDESKTOP/refresh" ~/.local/bin/refresh
if [[ -z "$UPDATE_REEXECED" ]]; then
export UPDATE_REEXECED=1
exec ~/.local/bin/update
fi
for plugin in "$COREDESKTOP/updates.d/"*.sh; do
if [ -f "$plugin" ]; then
unset -f is_installed run_update
source "$plugin"
if declare -f run_update > /dev/null; then
if ! declare -f is_installed > /dev/null || is_installed; then
run_update
fi
fi
fi
done
echo "Done."