dotrepo unstable
dotrepo
This is a tool for managing a repository of a user's dotfiles. It organises a user's dotfiles in a single directory and creates symbolic links to these dotfiles where the dotfiles are normally located. For example ~/.config/nvim/init.vim
and ~/.config/fish/config.fish
are replaced with symbolic links to ~/.dotrepo/.config/nvim/init.vim
and ~/.dotrepo/.config/fish/config.fish
respectively. A user can then check ~/.dotrepo into version control.
Building
The following are required to build the application:
Once you have the crystal compiler setup and have this repository cloned to your machine, run the following command at the root of the repository:
crystal spec
You should get an output that looks something like:
Finished in 3.7 milliseconds
12 examples, 0 failures, 0 errors, 0 pending
If you get no output then you are probably in the wrong directory but crystal is properly setup. Otherwise, ensure that no failures are reported. To build the application, run the following command in the same directory:
crystal build src/dotrepo.cr --release
This produces a dotrepo
binary in the your current working directory. You should move this binary to your binaries directory (eg ~/bin).
Usage
dotrepo help # Displays usage instructions
dotrepo ls # Lists all files in repository
dotrepo import [path] # Imports file at path into dotfile repository
dotrepo export # Exports everything in repository to user directory
dotrepo export [repository-path] # Exports specific file from repository to user directory
dotrepo path # Prints out path of the dotfiles repository
There are three primary commands that are provided: import, export, and ls. All these commands operate on the dotfile repository. The default path for the dotfiles repository is ~/.dotfiles
, however this can be overriden through the environment variable DOTFILES_REPOSITORY
.
Contributing
- Fork it (https://github.com/your-github-user/dotfiles/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
You may want to adhere to this style guide. And please, with every feature try to include unit tests for the feature. For bugs fixes, it is also recommended that you include a unit test that replicates the bug if possible.
Contributors
- kwalter - creator and maintainer
dotrepo
- 1
- 0
- 2
- 0
- 1
- almost 3 years ago
- May 7, 2021
MIT License
Sun, 22 Dec 2024 01:15:11 GMT