chore: add redeploy.sh for /usr/local/bin install
Some checks are pending
Continuous Integration / linting (push) Waiting to run
Continuous Integration / formatting (push) Waiting to run

Builds workspace release, backs up existing binaries, installs
cosmic-applets/cosmic-app-list/cosmic-panel-button to /usr/local/bin
(precedence over pacman package via $PATH).

Leyoda 2026 – GPLv3
This commit is contained in:
Votre Nom 2026-04-26 11:12:15 +02:00
parent 22d6f353f1
commit 936147ecf6

56
redeploy.sh Executable file
View file

@ -0,0 +1,56 @@
#!/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."