fix update
This commit is contained in:
@@ -4,12 +4,12 @@ COREDESKTOP="$HOME/.local/share/coredesktop"
|
||||
|
||||
if [ -f ~/.local/bin/coreupdate ]; then
|
||||
echo "Migrating coreupdate -> update..."
|
||||
sudo cp "$COREDESKTOP/update" ~/.local/bin/update
|
||||
cp --remove-destination "$COREDESKTOP/update" ~/.local/bin/update
|
||||
sudo rm -f ~/.local/bin/coreupdate
|
||||
fi
|
||||
|
||||
if [ -f ~/.local/bin/corerefresh ]; then
|
||||
echo "Migrating corerefresh -> refresh..."
|
||||
sudo cp "$COREDESKTOP/refresh" ~/.local/bin/refresh
|
||||
cp --remove-destination "$COREDESKTOP/refresh" ~/.local/bin/refresh
|
||||
sudo rm -f ~/.local/bin/corerefresh
|
||||
fi
|
||||
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
COREDESKTOP="$HOME/.local/share/coredesktop"
|
||||
|
||||
source "$COREDESKTOP/utils.sh"
|
||||
source "$COREDESKTOP/packages.conf"
|
||||
|
||||
echo "Checking for new services..."
|
||||
enable_services "${SERVICES[@]}"
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Updating mise..."
|
||||
mise self-update -y
|
||||
|
||||
echo "Updating Ruby and Rails..."
|
||||
mise upgrade --bump ruby
|
||||
mise reshim
|
||||
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
is_installed() {
|
||||
[ -d "$HOME/.tmux/plugins/tpm" ]
|
||||
}
|
||||
|
||||
run_update() {
|
||||
echo "Updating TPM and tmux plugins..."
|
||||
local failed=0
|
||||
for plugin in "$HOME/.tmux/plugins/"*/; do
|
||||
[ -d "$plugin/.git" ] || continue
|
||||
echo " $(basename "$plugin")"
|
||||
git -C "$plugin" pull --ff-only --quiet || failed=1
|
||||
done
|
||||
return $failed
|
||||
}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Only the plugins are updated; the kickstart.nvim config itself is the user's to edit.
|
||||
is_installed() {
|
||||
command -v nvim &>/dev/null && [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lazy/lazy.nvim" ]
|
||||
}
|
||||
|
||||
run_update() {
|
||||
echo "Updating Neovim plugins..."
|
||||
nvim --headless "+Lazy! sync" +qa
|
||||
}
|
||||
+16
-2
@@ -1,4 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Updating pipx applications..."
|
||||
pipx upgrade-all
|
||||
# pipx venvs are tied to the Python they were built with, so a Python upgrade
|
||||
# breaks them in a way `pipx upgrade-all` can't repair. Rebuild them when the
|
||||
# Python version changes, or when an upgrade fails.
|
||||
STAMP="$HOME/.local/state/coredesktop/pipx-python-version"
|
||||
CURRENT_PYTHON="$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')"
|
||||
|
||||
if [ "$(cat "$STAMP" 2>/dev/null)" != "$CURRENT_PYTHON" ]; then
|
||||
echo "Python changed to $CURRENT_PYTHON, reinstalling pipx applications..."
|
||||
pipx reinstall-all
|
||||
else
|
||||
echo "Updating pipx applications..."
|
||||
if ! pipx upgrade-all; then
|
||||
echo "pipx upgrade-all failed, reinstalling pipx applications..."
|
||||
pipx reinstall-all
|
||||
fi
|
||||
fi && mkdir -p "$(dirname "$STAMP")" && echo "$CURRENT_PYTHON" > "$STAMP"
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
is_installed() {
|
||||
[ -f "$HOME/.local/bin/migrate" ]
|
||||
}
|
||||
|
||||
run_update() {
|
||||
echo "Updating Migrate..."
|
||||
local tmp
|
||||
tmp="$(mktemp)"
|
||||
if curl -fsSL -o "$tmp" https://github.com/CyphrRiot/Migrate/raw/main/bin/migrate && [ -s "$tmp" ]; then
|
||||
chmod +x "$tmp"
|
||||
mv "$tmp" "$HOME/.local/bin/migrate"
|
||||
else
|
||||
rm -f "$tmp"
|
||||
echo "Could not download Migrate; keeping the current version."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
is_installed() {
|
||||
command -v gnome-shell &>/dev/null
|
||||
}
|
||||
|
||||
run_update() {
|
||||
echo "Updating GNOME extensions..."
|
||||
|
||||
# Reinstall gext if missing or broken (e.g. its pipx venv went stale after a Python upgrade)
|
||||
if ! ~/.local/bin/gext --version &> /dev/null; then
|
||||
echo "gext missing or broken, reinstalling..."
|
||||
pipx uninstall gnome-extensions-cli 2>/dev/null || true
|
||||
pipx install --python "$(which python3)" gnome-extensions-cli --system-site-packages
|
||||
fi
|
||||
|
||||
# Update every enabled user extension to the latest version for this GNOME Shell.
|
||||
# The filesystem backend writes directly to ~/.local/share/gnome-shell/extensions;
|
||||
# GNOME Shell picks up the new code at next login.
|
||||
if ~/.local/bin/gext --filesystem update --user --yes; then
|
||||
echo "GNOME extensions up to date. Log out and back in to load any updated extensions."
|
||||
else
|
||||
echo "gext update failed; GNOME extensions were not updated."
|
||||
fi
|
||||
}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
COREDESKTOP="$HOME/.local/share/coredesktop"
|
||||
|
||||
is_installed() {
|
||||
command -v dconf &>/dev/null
|
||||
}
|
||||
|
||||
run_update() {
|
||||
bash "$COREDESKTOP/gnome/apply-gnome-settings.sh"
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Firmware updates often need a reboot, so this only reports what's available.
|
||||
is_installed() {
|
||||
command -v fwupdmgr &>/dev/null
|
||||
}
|
||||
|
||||
run_update() {
|
||||
echo "Checking for firmware updates..."
|
||||
fwupdmgr refresh &>/dev/null
|
||||
# get-updates exits 2 when there is nothing to update
|
||||
if fwupdmgr get-updates --no-unreported-check 2>/dev/null; then
|
||||
echo "Firmware updates are available. Run 'fwupdmgr update' to install them."
|
||||
else
|
||||
echo "No firmware updates available."
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Removing unused Flatpak runtimes..."
|
||||
flatpak uninstall --unused -y --noninteractive
|
||||
|
||||
if command -v paccache &>/dev/null; then
|
||||
echo "Trimming pacman package cache..."
|
||||
sudo paccache -rk2
|
||||
sudo paccache -ruk0
|
||||
fi
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If the running kernel's modules are gone, a newer kernel was installed
|
||||
if [ ! -d "/usr/lib/modules/$(uname -r)" ]; then
|
||||
echo "A newer kernel has been installed. Please reboot when convenient."
|
||||
fi
|
||||
Reference in New Issue
Block a user