Browse Source

Merge branch 'master' into altdirs

Alois Mahdal 12 years ago
parent
commit
13c673282e

+ 110
- 0
INSTALL.md View File

@@ -0,0 +1,110 @@
1
+INSTALLATION
2
+============
3
+
4
+
5
+Note that this will only work for dotfiles stored right in your `$HOME`.  Support
6
+for configuration stored in folders like ~/.config/application or
7
+~/.local/application is planned.
8
+
9
+
10
+To install, you need to perform following steps:
11
+
12
+1.  Clone repository to a stable place on your box
13
+
14
+    For now, I'm going to assume it's local/mydots
15
+
16
+2.  Move (and merge if needed) your existing configs to dotfiles folder.  Remove
17
+    the dot from name, e.g.:
18
+
19
+        $ mv ~/.gnucash ~/local/mydots/dotfiles/gnucash
20
+
21
+    This works for directories as well as files, although e.g. for bash, vim or
22
+    git, I recommend different solutions--see below.
23
+
24
+    Also note that you can name the dotfiles folder whatever you want; there's
25
+    no real connection with the repository.
26
+
27
+3.  Run mklinks script with single argument: path to dotfiles folder (or how
28
+    you named it), e.g.:
29
+
30
+        $ ~/local/mydots/mklinks ~/local/mydots/dotfiles
31
+
32
+    The script will create links back in your `$HOME`, uless they (or real files)
33
+    did already exist, in which case it will only warn you.  This makes it easy
34
+    to exclude some of your applications from some of your machines: just skip
35
+    step 2 for them.
36
+
37
+
38
+Instructions for bash
39
+---------------------
40
+
41
+Although similar technique could be used for bash, I prefer toi have defaults
42
+specified by distro.  Therefore I use other technique:
43
+
44
+Instead of step 2 above, move/merge your specific ~/.bashrc changes to either
45
+one of these, or preferably, split them as needed:
46
+
47
+    dotfiles/bash/global-before.bashrc
48
+    dotfiles/bash/user/<your-username>.bashrc
49
+    dotfiles/bash/host/<your-hostname>.bashrc
50
+    dotfiles/bash/global-after.bashrc
51
+
52
+Then, replace your ~/.bashrc with your default distro's one, commonly found
53
+in /etc/skel/.bashrc, and patch it with dotfiles/bash/setup/bashrc.diff:
54
+
55
+    $ cp /etc/skel/.bashrc ~/
56
+    $ patch -u ~/.bashrc local/mydots/dotfiles/bash/setup/bashrc.diff
57
+
58
+From that point on, .bashrc will source appropriate fies for you, so do not make
59
+any changes to your local .bashrc, unless you really want them to be local, i.e.
60
+private only.
61
+
62
+
63
+Instructions for Vim
64
+--------------------
65
+
66
+If you want to keep default vim-ish behavior and have all local config in ~/.vimrc,
67
+you can use above generic steps.  However, if you want to have rtather more
68
+sophisticated model, and for example use my vim configuration as a starting point,
69
+do this instead of step 2:
70
+
71
+1.  Merge your local ~/.vimrc into dotfiles/vim/vimrc
72
+
73
+2.  Create a symlink to ~/.vim/vimrc:
74
+
75
+        $ cd
76
+        $ ln -s local/mydots/dotfiles/vim/vimrc .vimrc
77
+
78
+You could actually have your .vimrc symlink point right to local/mydots/...
79
+I find this more flexible, though.
80
+
81
+### perlcritic_vim ###
82
+
83
+Additionally, if you want to use perlcritic.vim, you need to:
84
+
85
+*   install Perl::Critic (from CPAN)
86
+
87
+*   put bin/perlcritic\_vim to your PATH
88
+
89
+Instructions for git
90
+--------------------
91
+
92
+**Note**: For most of config I have shared, you will need at least git 1.8.
93
+Without it, things will not work, and you might even end up with broken git!
94
+
95
+However, if you only want to use the sharing/splitting mechanism, 1.7 *should*
96
+be OK.  **No warranties**, though.
97
+
98
+The pricnicple is the same as in bash section above: a new folder is created,
99
+local config is split into parts per user/host or global one, and original file
100
+becomes just a crossroads into these.
101
+
102
+Except that since git does not support expansion in config paths, the file must
103
+be created by a script.  So what you want to do is the same as for bash above,
104
+except that instead of applying patch to your .gitconfig, you simply delete it
105
+and run dotfiles/git/setup.
106
+
107
+If you have a local changes that you don't want to share, you can either put them
108
+into the re-created ~.gitconfig, or (as I prefer) in dotfiles/git/privete/gitconfig
109
+
110
+

+ 2
- 0
dotfiles/bash/global-before.bashrc View File

@@ -14,9 +14,11 @@ export GLOBIGNORE=.:..
14 14
 
15 15
 # some more aliases
16 16
 alias ll='ls -lh'
17
+alias lla='ls -lha'
17 18
 alias open='gnome-open'
18 19
 alias diff='diff -u'
19 20
 alias pad4='sed -e "s/^/    /"'
21
+alias gitka='gitk --all'
20 22
 
21 23
 ### ...... ###
22 24
 ### OTHERS ###

+ 1
- 0
dotfiles/bash/host/azzgoat.bashrc View File

@@ -42,6 +42,7 @@ alias lico-update.sh='~/bin/lico-update.sh'
42 42
 
43 43
 # tame minions
44 44
 export PERL5LIB="$PERL5LIB:$HOME/lib/minions/lib"
45
+export PERL5LIB="$PERL5LIB:$HOME/local/gnucash-importer/lib"
45 46
 
46 47
 # Add RVM to PATH for scripting
47 48
 export PATH=$PATH:$HOME/.rvm/bin

+ 1
- 0
dotfiles/bash/host/brn-mahdal.bashrc View File

@@ -21,6 +21,7 @@ alias gnucash="LANG=cs_CZ.utf8 gnucash"
21 21
 ### '''''' ###
22 22
 
23 23
 export PERL5LIB="$PERL5LIB:$HOME/lib/minions/lib"
24
+export PERL5LIB="$PERL5LIB:$HOME/local/gnucash-importer/lib"
24 25
 
25 26
 export current_project=mobile-issues
26 27