#!/usr/bin/env bash # Recompile et déploie le fork local cosmic-applets (multiplexor cosmic-applets + # binaire séparé cosmic-app-list). # # Cibles : /usr/local/bin/cosmic-applets et /usr/local/bin/cosmic-app-list # (binaires compilés manuellement, hors pacman, qui priment sur ceux du paquet # via $PATH /usr/local/bin avant /usr/bin). # # Branche de déploiement : yoda-dock-magnification (contient les commits # magnification + le fix Wayland error handling). set -euo pipefail REPO="/home/lionel/Devels/cosmic-applets" TARGETS=( "cosmic-applets" "cosmic-app-list" "cosmic-panel-button" ) BIN_DIR="/usr/local/bin" cd "$REPO" echo "==> Branche actuelle : $(git branch --show-current)" echo "==> Build release (workspace)..." cargo build --release --workspace STAMP=$(date +%Y%m%d-%H%M%S) for bin in "${TARGETS[@]}"; do src="$REPO/target/release/$bin" dst="$BIN_DIR/$bin" if [[ ! -f "$src" ]]; then echo "!! Binaire absent après build : $src" >&2 exit 1 fi if [[ -f "$dst" ]]; then echo "==> Backup $dst" sudo cp -a "$dst" "${dst}.bak.${STAMP}" fi echo "==> Install $src -> $dst" sudo install -m755 "$src" "$dst" done echo "==> Kill des process applet en cours (cosmic-panel relancera à la demande)" pkill -u "$USER" -f "/usr/local/bin/cosmic-applet" || true pkill -u "$USER" -f "/usr/local/bin/cosmic-app-list" || true pkill -u "$USER" -f "/usr/local/bin/cosmic-panel-button" || true echo "==> Vérif" for bin in "${TARGETS[@]}"; do file "$BIN_DIR/$bin" done echo "OK — relogin recommandé pour repartir sur des process applet propres."