diff --git a/install.sh b/install.sh index 218e545..c384f20 100644 --- a/install.sh +++ b/install.sh @@ -250,13 +250,12 @@ perform_update() { if [ -d "$script_dir/plugin" ]; then # Lösche vorherige Dateien NICHT — das könnte andere Submodule zerstören # Kopiere ALLE Dateien aus plugin/ rekursiv (behält Struktur) - find "$script_dir/plugin" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' \ - | while read -r src; do + while read -r src; do rel="${src#$script_dir/plugin/}" dst="$PLUGIN_DST/$rel" mkdir -p "$(dirname "$dst")" cp "$src" "$dst" - done + done < <(find "$script_dir/plugin" -type f ! -path '*/__pycache__/*' ! -name '*.pyc') copied_count=$(find "$script_dir/plugin" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' | wc -l) msg copied "$copied_count" fi @@ -488,13 +487,12 @@ mkdir -p "$PLUGIN_DST" if [ -d "$SCRIPT_DIR/plugin" ]; then # Lösche vorherige Dateien NICHT — das könnte andere Submodule zerstören # Kopiere ALLE Dateien aus plugin/ rekursiv (behält Struktur) - find "$SCRIPT_DIR/plugin" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' \ - | while read -r src; do + while read -r src; do rel="${src#$SCRIPT_DIR/plugin/}" dst="$PLUGIN_DST/$rel" mkdir -p "$(dirname "$dst")" cp "$src" "$dst" - done + done < <(find "$SCRIPT_DIR/plugin" -type f ! -path '*/__pycache__/*' ! -name '*.pyc') copied_count=$(find "$SCRIPT_DIR/plugin" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' | wc -l) msg copied "$copied_count" fi