forked from ingydotnet/...
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
164 lines (127 loc) · 6.13 KB
/
README
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
NAME ...
Unix dot file management and sharing
QUICK INSTALL
Just run these 2 commands for a basic ... setup.
> git clone git://github.com/ingydotnet/....git
> ./.../...
SYNOPSIS
NOTE: In the following lines, '> ' is a command line prompt, and '...'
is the literal name of this program.
> ... help # Get help
> ... backup # Backup your old dot files
> ... list # List the source files that will install
> ... install # Install your dot files
> ... update # Update your dot files
> ... upgrade # Do update and then install.
> ... status # Check status of your dot file repos
> ... remove # Remove all installed dot files
> ... restore ~/.../backup/20101112-235947/
DESCRIPTION
Unix dot files do not get the care they deserve. They quietly make our
computers work comfortably for us, and yet we toss them about carelessly
from machine to machine. We make a tweak here and an addition there,
without keeping them all properly groomed and in sync.
DotDotDot (aka "...") is a toolset for managing sets of Unix dot files
and configuring them for a given machine. The files usually come from
various source control repositories (like git or svn). You can use other
people's repositories, or make your own, or both. You can share your
repositories with others on hosting sites like GitHub, and also keep you
private settings in repositories on your private server.
DotDotDot takes these concerns into account:
* You have multiple machines with varying requirements
* Some of your setting are private
* You might work as multiple users
DotDotDot is a great way to share settings on an agile development team
at your work place. When you pair program, you know that you can expect
common commands to work on a coworker's shell, but both of you can also
have your personal settings too.
Also, with DotDotDot, you can easy try new groups of settings, and then
restore to your previous settings when you are done.
DotDotDot installs a command line program called "..." (yes, literally
three period characters). It does all the actions you will need to keep
your dot files a big happy family.
PREREQUISITES
The "..." comand requires the following standard Unix tools in your
PATH:
* perl (any old version since 1998)
* cat
* cp
* cpio
* rm
You'll need one or more collections of dot files. Here's a few:
* git://github.com/ingydotnet/dotdotdot.git
* git://github.com/ingydotnet/ingy-dots.git
* git://github.com/socialtext/stconfig.git
You can also make your own repository from one of your current machine's
configuration. See below.
INSTALLATION
To install "...", run these commands in your Unix shell:
> cd $HOME
> git clone git://github.com/ingydotnet/....git
> cd .../src
> # Get collections of dot files from various places
> git clone git://github.com/ingydotnet/dotdotdot.git
> git clone git://github.com/ingydotnet/ingy-dots.git personal
> svn checkout your/svn/dot/file/repo private
> cd ..
> cp conf.example conf
> vim conf # Edit the ... configuration file
> cd $HOME
> .../bin/... -h # Show ... help info
> .../bin/... backup # Backup your existing dot files
> .../bin/... install # Install your new dot files
> exec bash
> ... upgrade
LINKS
There are 3 possible ways to install your dot files:
* hardlink to source (default)
* symlink to source
* copy from source
You can change this with the "install_method" configuration setting.
Using links is preferable. That way if you change a dot file in your
home directory, it gets changed in its source repository. Then you can
push/pull changes upstream, and share them with your other machines and
with the world.
Hard links are visially quiet, and symlinks are noisy. Your choice. Use
copy when you don't want changes in $HOME to change files in your repo.
BACKUPS
DotDotDot has a command to make a backup of all the files it would
replace on the install command.
If you have the "auto_backup" option set in your config file (this is
the default value; you would have to actually turn it off to disable
it), then DotDotDot will make a backup of your files every time you run
another command that might change your dot files.
Backups are just timestamp named directories under "$HOME/.../backup/".
Like this:
/home/ingy/.../backup/20101121-094620
You can restore your dot files from a backup with the "... restore
directory-name" command.
Using Backup to Make a New Repository
If you are new to DotDotDot and want to take your dot files from one
machine, make them into a repository and share them with your other
machines, DotDotDot makes that easy. Just follow these steps:
> ... backup
Backed up 69 dot files to /home/ingy/.../backup/20101121-094620
> cd ~/...
> mv backup/20101121-094620 src/my-dots
> # Add C<my-dots> to C<dot_paths> in the C<conf> file.
> ... remove # Delete all your dot files from $HOME
> ... install # Reinstall them (as links!)
> cd src/my-dots
> git init
> git add .
> git commit -m 'first commit'
> git remote add origin <url-to-upstream-repo>
> git push origin master
CREDIT
This work is based on my experience working at Socialtext and their
"stconfig" common settings: http://github.com/socialtext/stconfig
AVAILABILITY
This project is currently available at: http://github.com/ingydotnet/...
AUTHOR
Ingy döt Net <ingy@cpan.org>
COPYRIGHT
Copyright (c) 2010. Ingy döt Net.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html