Change bootstrap to use standard stow functions
Removed the `autostow.sh` scipt. Its use was to call stow for every folder in base directory and ignore certain folders. Both those functions can be handled by stow on its own. Stow allows defining per-directory ignore patterns with `.stow-loca-ignore` files, which can be set to `.*` to completely ignore a folder, just as before. And Stow can be called with a glob pattern to automatically call it for every directory in the repository. `.stowrc` additionally makes sure that all operations take place targeting the home directory of the current user, since that is where the dotfiles will (generally) be stored. Of course, this can be overridden with the stow command-line options (see option precedence in stow manual). Finally, the bootstrap stow module adds an alias `dotlink` to the shell, which allows fast (re-)stowing of all directories in the dotfile repository. It uses a hard-coded location for the .dotfiles base directory, so if the dotfiles are cloned anywhere else this has to be customized.
This commit is contained in:
parent
1d28202f17
commit
71f9076846
7 changed files with 30 additions and 133 deletions
11
README.md
11
README.md
|
|
@ -20,8 +20,15 @@
|
|||
The dotfiles use `GNU stow` to link themselves in the home directory. You can clone this repository anywhere (though I have mine in `~/.dotfiles` as it seemed most logical for me).
|
||||
|
||||
Once in the repository directory, when you then run `./install.sh` it will install many of the packages I use (though they are probably slightly out-of-date) and link the dotfiles into the home directory.
|
||||
Since it is based on `stow`, it will not overwrite anything already in the home directory.
|
||||
If you do not want to install any packages but only link the dotfiles run `./_bootstrap/autostow.sh -s`, once again from the main repository directory.
|
||||
Since it is based on `stow`, it will not overwrite anything already in the home directory (though you can force it to if you really want, using `stow --override='.*'` -- I do not recommend this).
|
||||
|
||||
If you do not want to install any packages, but only link the dotfiles run `stow -S */` from the main repository directory.
|
||||
|
||||
After all files are linked and you open a new shell session, the `dotlink` alias will allow you to re-link all dotfiles from anywhere on the system.[^1]
|
||||
|
||||
[^1]: This alias only works when the dotfiles are cloned into `~/.dotfiles` mirroring my setup.
|
||||
This is due to a hard-coded cd into this directory.
|
||||
If your dotfiles lie in another directory and you want to use the dotlink alias, simply change the corresponding line in `_bootstrap/.config/sh/alias.d/dotlink.sh`]
|
||||
|
||||
Both automatic installation paths are presumably somewhat brittle. In any case, I would suggest to manually look through the files for things you want instead of copying and activating everything.
|
||||
Dotfiles are too personal to be standardized like that.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue