|
34 | 34 |
|
35 | 35 | yadm git-crypt [ options ]
|
36 | 36 |
|
| 37 | + yadm transcrypt [ options ] |
| 38 | + |
37 | 39 | yadm upgrade
|
38 | 40 |
|
39 | 41 | yadm introspect category
|
|
101 | 103 | user.
|
102 | 104 |
|
103 | 105 | config This command manages configurations for yadm. This command
|
104 |
| - works exactly they way git-config(1) does. See the CONFIGURA- |
105 |
| - TION section for more details. |
| 106 | + works exactly the way git-config(1) does. See the CONFIGURATION |
| 107 | + section for more details. |
106 | 108 |
|
107 | 109 | decrypt
|
108 | 110 | Decrypt all files stored in $HOME/.config/yadm/files.gpg. Files
|
|
185 | 187 | can be disabled by setting the configuration yadm.auto-perms to
|
186 | 188 | "false".
|
187 | 189 |
|
| 190 | + transcrypt options |
| 191 | + If transcrypt is installed, this command allows you to pass |
| 192 | + options directly to transcrypt, with the environment configured |
| 193 | + to use the yadm repository. |
| 194 | + |
| 195 | + transcrypt enables transparent encryption and decryption of |
| 196 | + files in a git repository. You can read |
| 197 | + https://github.com/elasticdog/transcrypt for details. |
| 198 | + |
188 | 199 | upgrade
|
189 | 200 | Version 2 of yadm uses a different directory for storing your
|
190 | 201 | configurations. When you start to use version 2 for the first
|
|
495 | 506 | most *nix systems. To use this processor, specify the value of
|
496 | 507 | "default" or just leave the value off (e.g. "##template").
|
497 | 508 |
|
498 |
| - j2cli To use the j2cli Jinja template processor, specify the value of |
| 509 | + ESH ESH is a template processor written in POSIX compliant shell. It |
| 510 | + allows executing shell commands within templates. This can be |
| 511 | + used to reference your own configurations within templates, for |
| 512 | + example: |
| 513 | + |
| 514 | + <% yadm config mysection.myconfig %> |
| 515 | + |
| 516 | + To use the ESH template processor, specify the value of "esh" |
| 517 | + |
| 518 | + j2cli To use the j2cli Jinja template processor, specify the value of |
499 | 519 | "j2" or "j2cli".
|
500 | 520 |
|
501 | 521 | envtpl To use the envtpl Jinja template processor, specify the value of
|
502 | 522 | "j2" or "envtpl".
|
503 | 523 |
|
504 | 524 |
|
505 |
| - NOTE: Specifying "j2" as the processor will attempt to use j2cli or |
| 525 | + NOTE: Specifying "j2" as the processor will attempt to use j2cli or |
506 | 526 | envtpl, whichever is available.
|
507 | 527 |
|
508 |
| - If the template processor specified is available, templates will be |
| 528 | + If the template processor specified is available, templates will be |
509 | 529 | processed to create or overwrite files.
|
510 | 530 |
|
511 |
| - During processing, the following variables are available in the tem- |
| 531 | + During processing, the following variables are available in the tem- |
512 | 532 | plate:
|
513 | 533 |
|
514 |
| - Default Jinja Description |
| 534 | + Default Jinja or ESH Description |
515 | 535 | ------------- ------------- --------------------------
|
516 | 536 | yadm.class YADM_CLASS Locally defined yadm class
|
517 | 537 | yadm.distro YADM_DISTRO lsb_release -si
|
|
520 | 540 | yadm.user YADM_USER id -u -n
|
521 | 541 | yadm.source YADM_SOURCE Template filename
|
522 | 542 |
|
523 |
| - NOTE: The OS for "Windows Subsystem for Linux" is reported as "WSL", |
| 543 | + NOTE: The OS for "Windows Subsystem for Linux" is reported as "WSL", |
524 | 544 | even though uname identifies as "Linux".
|
525 | 545 |
|
526 |
| - NOTE: If lsb_release is not available, DISTRO will be the ID specified |
| 546 | + NOTE: If lsb_release is not available, DISTRO will be the ID specified |
527 | 547 | in /etc/os-release.
|
528 | 548 |
|
529 | 549 | Examples:
|
|
536 | 556 | config=dev-whatever
|
537 | 557 | {% endif %}
|
538 | 558 |
|
539 |
| - would output a file named whatever with the following content if the |
| 559 | + would output a file named whatever with the following content if the |
540 | 560 | user is "harvey":
|
541 | 561 |
|
542 | 562 | config=work-Linux
|
|
545 | 565 |
|
546 | 566 | config=dev-whatever
|
547 | 567 |
|
548 |
| - An equivalent Jinja template named whatever##template.j2 would look |
| 568 | + An equivalent Jinja template named whatever##template.j2 would look |
549 | 569 | like:
|
550 | 570 |
|
551 | 571 | {% if YADM_USER == 'harvey' -%}
|
|
554 | 574 | config=dev-whatever
|
555 | 575 | {% endif -%}
|
556 | 576 |
|
| 577 | + An equivalent ESH templated named whatever##template.esh would look |
| 578 | + like: |
| 579 | + |
| 580 | + <% if [ "$YADM_USER" = "harvey" ]; then -%> |
| 581 | + config=<%= $YADM_CLASS %>-<%= $YADM_OS %> |
| 582 | + <% else -%> |
| 583 | + config=dev-whatever |
| 584 | + <% fi -%> |
| 585 | + |
557 | 586 |
|
558 | 587 | ## ENCRYPTION
|
559 | 588 | It can be useful to manage confidential files, like SSH or GPG keys,
|
|
0 commit comments