tmux-party/deploy.sh
veg 2dc9285433 docs: repair README and deploy.sh drift
README: tmux requirement wording, invite-only list marker, name
charset, --party on moderation rows, PARTY_SOCKET_DIR whitespace note,
read-only join fallback. deploy.sh: drop phantom tests/run-remote.sh
include (file lives under legacy/ only) and fix the ship-list comment.
SERVERS.md and HISTORY.md were refreshed too but stay local-only per
.git/info/exclude ("Local docs — never published").
2026-07-04 10:33:14 +00:00

48 lines
1.4 KiB
Bash
Executable file

#!/bin/sh
# Sync the deployable surface to a remote host for `make install`. Pins the
# include list to what the project ships: Makefile, party, party.1,
# README.md, tools/post-install.sh, and tests/ (so the host can run `make
# check` as a target-OS smoke test). This is the dev-rsync variant. The
# release-tarball variant strips tests/ as well; not implemented here.
#
# Usage:
# ./deploy.sh <host>[:path] [extra rsync args]
#
# Path defaults to `tmux-party-src` (relative to the remote login user's
# home directory) when omitted.
#
# Examples:
# ./deploy.sh user@domain.tld # → :tmux-party-src
# ./deploy.sh user@domain.tld:dev/tmux-party-src # explicit path
# ./deploy.sh user@domain.tld -n # dry-run, default path
set -eu
dest="${1:-}"
[ -n "$dest" ] || {
echo "usage: $0 <host>[:path] [extra rsync args]" >&2
exit 2
}
shift
# Default path when only a host (no ":path") is given. Bare-host form
# is the common case for casual sync; an explicit path overrides it.
case "$dest" in
*:*) ;;
*) dest="$dest:tmux-party-src" ;;
esac
cd "$(dirname "$0")"
exec rsync -av --delete "$@" \
--include='/Makefile' \
--include='/party' \
--include='/party.1' \
--include='/README.md' \
--include='/tools/' \
--include='/tools/post-install.sh' \
--include='/tests/' \
--include='/tests/*.bats' \
--include='/tests/helpers.bash' \
--exclude='*' \
./ "$dest"