init commit
This commit is contained in:
14
ctrl/sync.sh
Executable file
14
ctrl/sync.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Sync project to receiver machine via rsync
|
||||
# Usage: ./sync.sh [user@host] [remote_path]
|
||||
set -euo pipefail
|
||||
|
||||
REMOTE="${1:-mariano@mcrndeb}"
|
||||
REMOTE_PATH="${2:-~/wdir/cht/}"
|
||||
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
rsync -avz --delete \
|
||||
--exclude='.git/' \
|
||||
--filter=':- .gitignore' \
|
||||
"$PROJECT_DIR/" \
|
||||
"${REMOTE}:${REMOTE_PATH}"
|
||||
Reference in New Issue
Block a user