blob: f9470dd3cfff329f2b5af43140b9db9082d77572 (
plain) (
blame)
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
|
# home.files
These are my dotfiles.
This repo succeeds [Syndamia/dotfiles](https://gitlab.com/Syndamia/dotfiles) (where the idea was to make your entire home directory a git repo) and code from commit [375d11b](https://git.syndamia.com/conf/.files/commit/?id=375d11b33142e971a82f28ddb4cc7d386e3551cf) overhauls the way to manage files.
## Init
```sh
cd ~
git clone https://git.syndamia.com/conf/.files
cd .files
./make link
```
## Usage
Everything is done with the `make` POSIX shell script.
The files in every directory mirror the folder structure which in the home directory (so, `.files/A/B/c.txt` will be linked/copied/... to `~/B/c.txt`).
In `SYSTEM` there is a file for every currently configured hostname, listing each subdirectory in `.files` which should be handled.
`make` supports the following actions (all preserving folder structure):
- `import` - move file(s) from home dir to a given subdir, and create a symlink from its location in home to the one in `.files`
- `export` - copy file(s) from `.files` to home dir
- `link` - iterating through all subdirs listed in the appropriate file under `SYSTEM`, export and import all files, or in other words, create links from the appropriate home dir location to `.files` for all files and folders.
- `safe_link` - like `link`, however, if the corresponding file in home is different than the one under `.files` do not import it (leave it as-as and do not create a symlink)
- `unlink` - iterating through all subdirs listed in the appropriate file under `SYSTEM`, remove all links in home to files in `.files`. Also removes any empty directories which might be left.
|