1
0
Fork 0
mirror of synced 2024-11-15 22:08:57 -05:00
Yet Another Dotfiles Manager
Find a file
Erik Flodin 8ba9823407
Rewrite default template to handle nested ifs, != and env vars in if
The awk script now performs all processing in the BEGIN block using an
implementation that is capable of handling if statements which contain nested
if statments (fixes #436). To make nested ifs look better, if, else and endif
lines can now have optional whitespace before {%.

Includes are now handled in the same way as the main file which means that
included files can both include other files and have if statements in addition
to variables (fixes #406). Include lines can now also have optional whitespace
before {%.

All variables are handled in the same way now so it's now possible to use env
variables in if statements (fixes #488).

Also add support for != in addition to == (fixes #358). Thus it's now
e.g. possible to check if a variable is set (#477) by doing:

{% if yadm.class != ""%}
Class is set to {{ yadm.class }}
{% endif %}

A non-existing yadm or env variable is now replaced with the empty string.
2024-11-04 22:30:23 +01:00
.github Remove superfluous space 2022-08-27 13:55:24 -05:00
completion Remove trailing whitespace 2022-07-08 08:12:08 -05:00
contrib Remove trailing space 2022-06-03 15:49:14 -05:00
test Rewrite default template to handle nested ifs, != and env vars in if 2024-11-04 22:30:23 +01:00
.flake8 Move all test/linting configs into pyproject.toml 2023-07-12 09:19:59 -05:00
.gitattributes Force eol=lf 2017-01-09 16:52:01 -06:00
.gitignore Use a common target to pick yadm to test in test/scripthost 2020-12-30 12:01:40 +01:00
bootstrap Standardize on &> when not appending output 2019-12-04 22:39:00 -06:00
CHANGES Update version number and update documentation 2023-01-23 13:25:54 -06:00
CONTRIBUTORS Update version number and update documentation 2023-01-23 13:25:54 -06:00
LICENSE Update GPLv3 LICENSE information 2019-03-14 18:25:02 -05:00
Makefile Update test Docker image 2023-07-12 09:19:53 -05:00
pyproject.toml Move all test/linting configs into pyproject.toml 2023-07-12 09:19:59 -05:00
README.md Update to shields.io new API 2023-01-23 13:51:06 -06:00
yadm Rewrite default template to handle nested ifs, != and env vars in if 2024-11-04 22:30:23 +01:00
yadm.1 Update version number and update documentation 2023-01-23 13:25:54 -06:00
yadm.md Update version number and update documentation 2023-01-23 13:25:54 -06:00
yadm.spec Update version number and update documentation 2023-01-23 13:25:54 -06:00

yadm - Yet Another Dotfiles Manager

Latest Version Homebrew Version OBS Version Arch Version License
Master Update Develop Update Website Update
Master Status Develop Status GH Pages Status Dev Pages Status

https://yadm.io/

yadm is a tool for managing dotfiles.

  • Based on Git, with full range of Git's features
  • Supports system-specific alternative files or templated files
  • Encryption of private data using GnuPG, OpenSSL, transcrypt, or git-crypt
  • Customizable initialization (bootstrapping)
  • Customizable hooks for before and after any operation

Complete features, usage, examples and installation instructions can be found on the yadm.io website.

A very quick tour

# Initialize a new repository
yadm init

# Clone an existing repository
yadm clone <url>

# Add files/changes
yadm add <important file>
yadm commit

# Encrypt your ssh key
echo '.ssh/id_rsa' > ~/.config/yadm/encrypt
yadm encrypt

# Later, decrypt your ssh key
yadm decrypt

# Create different files for Linux vs MacOS
yadm add path/file.cfg##os.Linux
yadm add path/file.cfg##os.Darwin

If you enjoy using yadm, consider adding a star to the repository on GitHub. The star count helps others discover yadm.