-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·65 lines (60 loc) · 1.67 KB
/
Copy pathdeploy.sh
File metadata and controls
executable file
·65 lines (60 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# deploy.sh — Sync canonical source to Omarchy plugin directory
#
# The Git repo (/home/roddy/Projects/Omarseafile/) is the source of truth.
# This script deploys plugin files to the Omarchy runtime location.
#
# Usage:
# ./deploy.sh # sync to default plugin dir
# ./deploy.sh --check # dry run, show what would change
#
# Excludes: .git/, docs/, README.md, deploy.sh, .gitignore
set -euo pipefail
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
PLUGIN_DIR="${OMARCHY_PLUGIN_DIR:-$HOME/.config/omarchy/plugins/roddy.seafile}"
DRY_RUN=false
case "$#:${1:-}" in
0:) ;;
1:--check) DRY_RUN=true ;;
*) echo "Usage: $0 [--check]" >&2; exit 2 ;;
esac
echo "Source: $REPO_DIR"
echo "Target: $PLUGIN_DIR"
if $DRY_RUN; then
echo "Mode: DRY RUN (no changes)"
echo ""
CHANGES="$(rsync -ainc --delete --omit-dir-times \
--exclude='.git/' \
--exclude='.agents/' \
--exclude='.codex/' \
--exclude='docs/' \
--exclude='README.md' \
--exclude='deploy.sh' \
--exclude='.gitignore' \
--exclude='PANEL_AUDIT.md' \
--exclude='__pycache__/' \
"$REPO_DIR/" "$PLUGIN_DIR/")"
if [[ -n "$CHANGES" ]]; then
printf '%s\n' "$CHANGES"
echo ""
echo "Dry run found deployment differences." >&2
exit 1
fi
echo ""
echo "Dry run complete. No files changed."
else
mkdir -p "$PLUGIN_DIR"
rsync -av --delete \
--exclude='.git/' \
--exclude='.agents/' \
--exclude='.codex/' \
--exclude='docs/' \
--exclude='README.md' \
--exclude='deploy.sh' \
--exclude='.gitignore' \
--exclude='PANEL_AUDIT.md' \
--exclude='__pycache__/' \
"$REPO_DIR/" "$PLUGIN_DIR/"
echo ""
echo "Deploy complete."
fi