migration fixes
This commit is contained in:
@@ -3,16 +3,9 @@
|
|||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source "$SCRIPT_DIR/../utils.sh"
|
source "$SCRIPT_DIR/../utils.sh"
|
||||||
|
|
||||||
PYTHON="$(which python3)"
|
|
||||||
|
|
||||||
install_packages python-pipx gnome-shell-extensions
|
install_packages python-pipx gnome-shell-extensions
|
||||||
|
|
||||||
# Install or reinstall gext if missing or broken
|
ensure_gext
|
||||||
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 "$PYTHON" gnome-extensions-cli --system-site-packages
|
|
||||||
fi
|
|
||||||
|
|
||||||
EXTENSIONS=(
|
EXTENSIONS=(
|
||||||
"tilingshell@ferrarodomenico.com"
|
"tilingshell@ferrarodomenico.com"
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Install the Tailscale GNOME extension
|
# Install the Tailscale GNOME extension
|
||||||
|
source "$HOME/.local/share/coredesktop/utils.sh"
|
||||||
|
|
||||||
ext="tailscale-gnome@diskmth.fr"
|
ext="tailscale-gnome@diskmth.fr"
|
||||||
|
ensure_gext || exit 1
|
||||||
if ! ~/.local/bin/gext list | grep -q "$ext"; then
|
if ! ~/.local/bin/gext list | grep -q "$ext"; then
|
||||||
~/.local/bin/gext --filesystem install "$ext"
|
~/.local/bin/gext --filesystem install "$ext" || exit 1
|
||||||
~/.local/bin/gext --filesystem enable "$ext"
|
|
||||||
fi
|
fi
|
||||||
|
# Enable even if it was already installed, in case an earlier run stopped short
|
||||||
|
~/.local/bin/gext --filesystem enable "$ext"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "$HOME/.local/share/coredesktop/utils.sh"
|
||||||
|
|
||||||
is_installed() {
|
is_installed() {
|
||||||
command -v gnome-shell &>/dev/null
|
command -v gnome-shell &>/dev/null
|
||||||
}
|
}
|
||||||
@@ -7,12 +9,7 @@ is_installed() {
|
|||||||
run_update() {
|
run_update() {
|
||||||
echo "Updating GNOME extensions..."
|
echo "Updating GNOME extensions..."
|
||||||
|
|
||||||
# Reinstall gext if missing or broken (e.g. its pipx venv went stale after a Python upgrade)
|
ensure_gext || return 1
|
||||||
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.
|
# Update every enabled user extension to the latest version for this GNOME Shell.
|
||||||
# The filesystem backend writes directly to ~/.local/share/gnome-shell/extensions;
|
# The filesystem backend writes directly to ~/.local/share/gnome-shell/extensions;
|
||||||
|
|||||||
@@ -41,6 +41,15 @@ install_pipx_apps() {
|
|||||||
return $status
|
return $status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Reinstall gext if missing or broken. Its pipx venv goes stale when Arch
|
||||||
|
# upgrades Python, and migrations run before updates.d/60-pipx.sh rebuilds it.
|
||||||
|
ensure_gext() {
|
||||||
|
~/.local/bin/gext --version &> /dev/null && return 0
|
||||||
|
echo "gext missing or broken, reinstalling..."
|
||||||
|
pipx uninstall gnome-extensions-cli &> /dev/null || true
|
||||||
|
pipx install --python "$(which python3)" gnome-extensions-cli --system-site-packages
|
||||||
|
}
|
||||||
|
|
||||||
# Function to remove pacman/AUR packages if installed
|
# Function to remove pacman/AUR packages if installed
|
||||||
remove_packages() {
|
remove_packages() {
|
||||||
local packages=("$@")
|
local packages=("$@")
|
||||||
|
|||||||
Reference in New Issue
Block a user