diff --git a/plugins/homelab/.claude-plugin/plugin.json b/plugins/homelab/.claude-plugin/plugin.json index 4e54148..09f23c9 100644 --- a/plugins/homelab/.claude-plugin/plugin.json +++ b/plugins/homelab/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "homelab", "displayName": "Homelab", - "version": "0.2.2", + "version": "0.2.3", "author": { "name": "4nrry", "url": "https://github.com/4nrry" diff --git a/plugins/homelab/skills/tarball-installer/scripts/tarball-install b/plugins/homelab/skills/tarball-installer/scripts/tarball-install index efa9244..74a69ee 100755 --- a/plugins/homelab/skills/tarball-installer/scripts/tarball-install +++ b/plugins/homelab/skills/tarball-installer/scripts/tarball-install @@ -14,7 +14,7 @@ # Desinstalar: tarball-install --uninstall set -euo pipefail -SCRIPT_VERSION=1.5 +SCRIPT_VERSION=1.6 die() { echo "error: $*" >&2; exit 1; } info() { echo ":: $*"; } @@ -253,7 +253,13 @@ if [ -n "$UNINSTALL" ]; then app="$UNINSTALL" [ -d "$PREFIX/$app" ] || die "not installed in $PREFIX/$app (use --system if it was installed in /opt)" $SUDO rm -rf "$PREFIX/$app" "$BINDIR/$app" "$APPDIR/$app.desktop" - $SUDO find "$ICONDIR/hicolor" -name "$app.png" -o -name "$app.svg" 2>/dev/null | while read -r f; do $SUDO rm -f "$f"; done + # Sem o diretório hicolor (app instalado sem ícone num HOME novo) o find + # sai com erro, e sob pipefail isso derrubava o script aqui — depois de já + # ter apagado tudo, sem a mensagem e sem atualizar os caches. + if [ -d "$ICONDIR/hicolor" ]; then + $SUDO find "$ICONDIR/hicolor" \( -name "$app.png" -o -name "$app.svg" \) 2>/dev/null \ + | while read -r f; do $SUDO rm -f "$f"; done || true + fi refresh_caches info "removed: $app (profiles/configs in ~/.config and ~/.$app are left untouched)" exit 0