-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME
More file actions
77 lines (52 loc) · 2.79 KB
/
README
File metadata and controls
77 lines (52 loc) · 2.79 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
66
67
68
69
70
71
72
73
74
75
= CodeSync =
This is a mac utility that uses rsync to immediately synchronize file
changes to a server or remote computer, as you work.
NOTE: Since it uses rsync to communicate with the server, it is important
to setup passwordless public/private keys: http://www.ece.uci.edu/~chou/ssh-key.html
CodeSync uses a project file (see example below) that tells it how to connect to
the server and which directories to keep in sync.
== PASSWORDS and PUBLIC/PRIVATE KEYS ==
Each time rsync communicates with the server it'll ask for your password, which is
really annoying, unless you setup a passwordless public/private keys.
Follow the instructions at the following URL to be able to sync without passwords:
http://bit.ly/PcTRK
== INSTALL ==
* Download the latest version of CodeSync:
http://github.com/jgillick/CodeSync/archives/master
* Extract the source code.
* In the source directory run: sudo ./install
== Using CodeSync ==
* Decide where you want the local project workspace to be. For example: ~/Projects/Work/
* In your workspace, create a directory for the files: ~/Projects/Work/files/
* Copy the sampleProject file to your Work directory and name it 'project': ~/Projects/Work/project
(See 'EXAMPLE PROJECT FILE' section below)
* Edit the project file:
+ Set the server/username (be sure you have setup your passwordless public/private keys)
+ remote_basedir should be set to the workspace directory on your remote machine.
+ Set local_basedir to '~/Projects/Work/files/'
+ Add the directories you will be working in to the sync_dirs directory.
* Now run the program: codeSync ~/Projects/Work/project
== EXAMPLE PROJECT FILE ==
# Server details
server="remoteserver.com"
username="johndoe"
# Base directories to sync from/to
remote_basedir="/home/johndoe/svn/"
local_basedir="~/Projects/Work/files/"
# The directories to sync, relative to the base directories
sync_dirs=[ "/static/js",
"/static/css",
"/gui/jsp" ]
# sync_dirs=[ ] # This will sync the entire base directories
# The contents of these directories will only sync "up" to the server.
# This means the contents will never be downloaded from the server
# but files added or changed locally will be sent to the server
#
# sync_up=[ "/static/img" ]
sync_up=[ ]
== BASE DIRECTORIES vs SYNC DIRECTORIES ==
The base directories are where everything happens on the local and server machines.
If you're working with a large code base you wont want to download and sync ALL the files.
In this case you define the directories you'll be working on in the sync_dirs array.
If you don't want to download the contents of a directory from the server, but upload any changes
that are made, you can add those directory paths to the sync_up array.