-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.sh
More file actions
executable file
·48 lines (40 loc) · 1.05 KB
/
demo.sh
File metadata and controls
executable file
·48 lines (40 loc) · 1.05 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
#!/bin/bash
# demo.sh - Demonstrates twin tool usage
echo "=== Twin Tool Demo ==="
echo
# Show help
echo "1. Showing help:"
./twin -h
echo
# Show error handling
echo "2. Error handling - missing remote:"
./twin 2>&1 || true
echo
echo "3. Error handling - invalid directory:"
./twin myserver /non/existent/path 2>&1 || true
echo
echo "=== Installation ==="
echo "To install twin:"
echo " make install"
echo " make install PREFIX=~/bin # Custom location"
echo
echo "=== Usage Examples ==="
echo "Basic sync:"
echo " twin myserver # Sync current directory"
echo " twin myserver /path/to/project # Sync specific directory"
echo
echo "Bidirectional sync:"
echo " twin -p myserver # Push then pull back"
echo
echo "Custom rsync options:"
echo " twin -e '-av --delete' myserver # Use --delete flag"
echo " twin -e '-avz' myserver # Add compression"
echo
echo "=== SSH Configuration ==="
echo "Add this to ~/.ssh/config for easy access:"
echo "
Host myserver
HostName example.com
User myusername
Port 22
"