]> git.madduck.net Git - code/vcsh.git/blob - INSTALL

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Make INSTALL easy to use by way of templating
[code/vcsh.git] / INSTALL
1 =The template way=
2
3 ==Prerequisites==
4
5 Make sure none of those files/diretories exist for your test (user). If they do, move them away for now:
6
7 ~/.gitignore
8 ~/.mrconfig
9 ~/.config/mr/available.d/mr.vcsh
10 ~/.config/mr/available.d/zsh.vcsh
11 ~/.config/mr/config.d/mr.vcsh
12 ~/.config/vcsh/repo.d/mr.git/
13
14 All of the files are part of the template repo, the directory is where the template will be stored
15
16 apt-get install mr # this is optional, but highly recommended
17
18 ==Clone the template==
19
20     mkdir -p ~/work/git
21     cd !$
22     git clone git://github.com/RichiH/vcsh.git vcsh
23     cd vcsh
24     ln -s vcsh /usr/local/bin
25     cd
26     vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr.vcsh 
27
28 ==Enable your test repository==
29
30     mv ~/.zsh   ~/zsh.bak
31     mv ~/.zshrc ~/zsh.bak
32     cd ~/.config/mr/config.d/
33     ln -s ../available.d/mr.vcsh .
34     cd
35     mr up
36
37 ==Set up your own repos==
38
39 Now, it's time to edit the template config and fill it with your own remotes:
40
41     vim .config/mr/available.d/mr.vcsh
42     vim .config/mr/available.d/zsh.vcsh
43
44 And then create your own stuff
45
46     vcsh init foo
47     vcsh run foo git add -f bar baz quux
48     vcsh run foo git remote add origin git://quuux
49     vcsh run foo git commit
50     vcsh run foo git push
51     
52     cp .config/mr/available.d/mr.vcsh .config/mr/available.d/foo.vcsh
53     vim .config/mr/available.d/foo.vcsh # add your own repo
54
55 Done!
56
57 ==Daily use==
58
59 This is the beauty of it all. Once you are set up, just run:
60
61    mr up
62    mr push
63
64 Neat.
65
66
67 =The manual way=
68
69 # This is how my setup looks. Adapt to your style or copy mine verbatim, both is fine.
70
71 # Create workspace
72     mkdir -p ~/work/git
73     cd !$
74
75 # Clone vcsh and make it available
76     git clone git://github.com/RichiH/vcsh.git vcsh
77     PATH+=":$HOME/work/git/vcsh"
78     export PATH
79
80 # Grab my mr config. see below for details on how I set this up
81     ~/work/git/vcsh/vcsh clone ssh://<remote>/mr.git
82     cd ~/.config/mr/config.d/
83     ln -s ../available.d/* .
84
85 # make vcsh work by default. Adapt for Bash etc as needed
86     cd
87     zsh ~/work/git/vcsh/vcsh clone ssh://<remote>/zsh.git
88     ln -s ~/work/git/vcsh/vcsh .zsh/functions
89     zsh
90
91
92
93
94 ################
95
96 # mr
97
98     ~ % cat ~/.mrconfig
99     [DEFAULT]
100     include = cat ~/.config/mr/config.d/*
101     ~ % echo $XDG_CONFIG_HOME
102     /home/richih/.config
103     ~ % ls $XDG_CONFIG_HOME/mr/available.d # random selection of my repos
104     git-annex gitk.vcsh git.vcsh ikiwiki mr.vcsh reportbug.vcsh snippets.git wget.vcsh zsh.vcsh
105     ~ % 
106 # then simply ln -s whatever you want on your local machine from
107 # $XDG_CONFIG_HOME/mr/available.d to $XDG_CONFIG_HOME/mr/config.d
108     ~ % cd
109     ~ % mr -j 5 up