1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00

refactor installation doc

This commit is contained in:
deadc0de6
2022-05-27 11:51:39 +02:00
committed by deadc0de
parent 1584f33591
commit c4dab40c36
4 changed files with 26 additions and 61 deletions

View File

@@ -24,7 +24,7 @@ and [link_on_import](https://dotdrop.readthedocs.io/en/latest/config-format/#con
Import the file:
```bash
$ ./dotdrop.sh import ~/.bashrc
$ dotdrop import ~/.bashrc
-> "/home/user/.bashrc" imported
```
@@ -39,7 +39,7 @@ dotfiles:
Install the dotfile, which will remove your `~/.bashrc` and replace it with a link to the file stored in dotdrop:
```bash
$ ./dotdrop.sh install
$ dotdrop install
Remove "/home/user/.bashrc" for link creation? [y/N] ? y
-> linked /home/user/.bashrc to /home/user/dotdrop/dotfiles/bashrc

View File

@@ -15,15 +15,15 @@ For example:
`config-user.yaml` is used when managing the user's dotfiles:
```bash
## user config file is config-user.yaml
$ ./dotdrop.sh import --cfg config-user.yaml <some-dotfile>
$ ./dotdrop.sh install --cfg config-user.yaml
$ dotdrop import --cfg config-user.yaml <some-dotfile>
$ dotdrop install --cfg config-user.yaml
...
```
`config-root.yaml` is used when managing the system's dotfiles and is to be used with `sudo` or directly by the root user:
```bash
## root config file is config-root.yaml
$ sudo ./dotdrop.sh import --cfg=config-root.yaml <some-dotfile>
$ sudo ./dotdrop.sh install --cfg=config-root.yaml
$ sudo dotdrop import --cfg=config-root.yaml <some-dotfile>
$ sudo dotdrop install --cfg=config-root.yaml
...
```

View File

@@ -1,16 +1,20 @@
# Installation
Installing dotdrop [as a submodule](#as-a-submodule) is the recommended way.
If you want to keep your Python environment clean, use the virtualenv installation instructions
(see [As a submodule in a virtualenv](#as-a-submodule-in-a-virtualenv) and
[PyPI package in a virtualenv](#pypi-package-in-a-virtualenv)).
In that case, the virtualenv environment might need to be loaded before any attempt to use dotdrop.
* PyPI: https://pypi.org/project/dotdrop/
* Homebrew: https://formulae.brew.sh/formula/dotdrop
* AUR (stable): https://aur.archlinux.org/packages/dotdrop/
* AUR (git version): https://aur.archlinux.org/packages/dotdrop-git/
* Snapcraft: https://snapcraft.io/dotdrop
* pacstall: https://github.com/pacstall/pacstall-programs/blob/master/packages/dotdrop/dotdrop.pacscript
## As a submodule
Having dotdrop as a submodule guarantees that anywhere
you are cloning your dotfiles Git tree from you will have dotdrop shipped with it.
Note that when using dotdrop as a submodule you will be tracking the master branch (and not a specific version)
The following will create a Git repository for your dotfiles and
keep dotdrop as a submodule:
keep dotdrop as a submodule.
```bash
## create the repository
$ mkdir dotfiles; cd dotfiles
@@ -28,9 +32,11 @@ $ ./dotdrop.sh --help
For macOS users, make sure to install `realpath` through Homebrew
(part of *coreutils*).
Using this solution will require you to work with dotdrop by
Using dotdrop as a submodule will require you to work with dotdrop by
using the generated script `dotdrop.sh` at the root
of your dotfiles repository.
of your dotfiles repository. Note that this script updates the submodule
automatically unless called with the environment variable `DOTDROP_AUTOUPDATE`
set to `no`.
To ease the use of dotdrop, it is recommended to add an alias to it in your
shell with the config file path; for example:
@@ -170,7 +176,7 @@ $ git clone https://github.com/deadc0de6/dotdrop.git
```
Start using it directly through the `dotdrop.sh` script and
use the `--cfg` to make it point to your config file.
use the `--cfg` switch to make it point to your config file.
```bash
$ cd dotdrop/