update hyprpm installation function
This commit is contained in:
parent
26a9b48af3
commit
4c3d42ee1e
1 changed files with 5 additions and 11 deletions
|
@ -72,24 +72,18 @@ hyprpm_update_plugin() {
|
|||
local REPO_NAME="${REPO_URL##*/}"
|
||||
IFS=',' read -ra PLUGINS_ARRAY <<< "$PLUGINS"
|
||||
|
||||
# Repository-Prüfung
|
||||
if ! hyprpm list 2>/dev/null | grep -q "$REPO_NAME"; then
|
||||
# Repository-Prüfung mit tr
|
||||
if ! hyprpm list 2>/dev/null | tr -dc '[[:print:]\n]' | grep -q "$REPO_NAME"; then
|
||||
echo "Füge Repository hinzu..."
|
||||
if ! hyprpm add "$REPO_URL" 2>/dev/null; then
|
||||
echo "⚠️ Repository konnte nicht hinzugefügt (existiert bereits?)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Plugin-Aktivierung mit Statusprüfung
|
||||
# Plugin-Verarbeitung mit tr und angepasstem Grep
|
||||
for PLUGIN in "${PLUGINS_ARRAY[@]}"; do
|
||||
if hyprpm list | ansi2txt | sed -E '
|
||||
/Plugin/{N;s/\n//;}
|
||||
s/[→│└─]//g
|
||||
s/Plugin //g
|
||||
s/enabled: /enabled:/
|
||||
s/^ +//g
|
||||
s/ +/ /g
|
||||
' | grep -q "^${PLUGIN} enabled:true"; then
|
||||
# Bereinige Ausgabe und prüfe Status
|
||||
if hyprpm list | tr -dc '[[:print:]\n]' | grep -A1 "Plugin $PLUGIN" | grep -q "enabled:.*true"; then
|
||||
echo "ℹ️ $PLUGIN ist bereits aktiviert"
|
||||
else
|
||||
echo "Aktiviere $PLUGIN..."
|
||||
|
|
Loading…
Add table
Reference in a new issue