blob: d1b51bc3a1449824c77e28d89481f647def40bf2 (
plain)
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
|
# dotup
A CLI tool to help symlink your dotfiles into place.
## Usage
Example file hierarchy with dotfiles.
```
configs
nvim/
init.vim
lua/
setup.lua
alacritty/
alacritty.yml
bash/
.bashrc
scripts/
script1.sh
script2.sh
script3.sh
```
### dotup init
Running `dotup init` will create an empty depot file in the current directory(by default).
```
$ dotup init
```
A new file, `depot.toml`, should have been created in the current directory.
### dotup link
The `link` subcommand can be used to tell where a file should be linked when installed.
Running `dotup link nvim .config/nvim` will create two new links:
+ `nvim/init.vim` -> `.config/nvim/init.vim`
+ `nvim/lua/setup.lua` -> `.config/nvim/lua/setup.lua`
This subcommand will, by default, only link files. If a directory is passed as argument then it will recursively link all files under that directory.
To link a directory use the flag `--directory`.
```
$ dotup link --directory scripts .scripts
```
This will create a new link
+ `scripts` -> `.scripts`
### dotup unlink
The `unlink` subcommand unlinks files.
```
$ dotup unlink nvim/lua/setup.lua
```
will remove the link `nvim/lua/setup.lua` -> `.config/nvim/lua/setup.lua`.
### dotup install
The `install` subcommand creates symlinks.
Like the `link` subcommand passing a directory as argument will recursively install anything under it, files and directories.
By default install will use the home directory as the install-base but this can be changed with the `--install-base <path>` parameter.
```
$ dotup install nvim
```
will create two symlinks
+ `nvim/init.vim` -> `$HOME/.config/nvim/init.vim`
+ `nvim/lua/setup.lua` -> `$HOME/.config/nvim/lua/setup.lua`
```
$ dotup install scripts
```
will create one symlink
+ `scripts` -> `$HOME/.scripts`
Any new scripts added to `$HOME/.scripts` will be created at `configs/scripts`.
### dotup uninstall
The `uninstall` subcommand removes the symlinks.
This will only remove symlinks if they were pointing to the correct file.
|