1
0
Fork 0
mirror of synced 2024-12-22 14:41:07 -05:00

Note exception for WSL (#113)

This commit is contained in:
Tim Byrne 2019-11-14 08:10:06 -06:00
parent 2e797b4b26
commit 073c5557c7
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12
2 changed files with 10 additions and 2 deletions

View file

@ -30,11 +30,15 @@ be omitted. Most attributes can be abbreviated as a single letter.
| `template`, `t` | Valid when the value matches a supported template processor. See the [Templates](/docs/templates) section for more details.| | `template`, `t` | Valid when the value matches a supported template processor. See the [Templates](/docs/templates) section for more details.|
| `user`, `u` | Valid if the value matches the current user. Current user is calculated by running <code>id&nbsp;&#8209;u&nbsp;&#8209;n</code>. | | `user`, `u` | Valid if the value matches the current user. Current user is calculated by running <code>id&nbsp;&#8209;u&nbsp;&#8209;n</code>. |
| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running <code>lsb_release&nbsp;&#8209;si</code>. | | `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running <code>lsb_release&nbsp;&#8209;si</code>. |
| `os`, `o` | Valid if the value matches the OS. OS is calculated by running <code>uname&nbsp;&#8209;s</code>. | | `os`, `o` | Valid if the value matches the OS. OS is calculated by running <code>uname&nbsp;&#8209;s</code>. <sup>*</sup> |
| `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using <code>yadm&nbsp;config&nbsp;local.class&nbsp;&lt;class&gt;</code>. | | `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using <code>yadm&nbsp;config&nbsp;local.class&nbsp;&lt;class&gt;</code>. |
|`hostname`, `h`|Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain.| |`hostname`, `h`|Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain.|
|`default`|Valid when no other alternate is valid.| |`default`|Valid when no other alternate is valid.|
<sub><sup>*
The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux".
</sup></sub>
You may use any number of conditions, in any order. An alternate will only be You may use any number of conditions, in any order. An alternate will only be
used if _ALL_ conditions are valid. For all files managed by yadm's repository used if _ALL_ conditions are valid. For all files managed by yadm's repository
or listed in `$HOME/.config/yadm/encrypt`, if they match this naming convention, or listed in `$HOME/.config/yadm/encrypt`, if they match this naming convention,

View file

@ -43,10 +43,14 @@ When template processors run, they will be provided the following set of data.
| `yadm.class` | `YADM_CLASS` | Locally defined yadm class | <code>yadm&nbsp;config&nbsp;local.class</code> | | `yadm.class` | `YADM_CLASS` | Locally defined yadm class | <code>yadm&nbsp;config&nbsp;local.class</code> |
| `yadm.distro` | `YADM_DISTRO` | Distribution | <code>lsb_release&nbsp;&#8209;si</code> | | `yadm.distro` | `YADM_DISTRO` | Distribution | <code>lsb_release&nbsp;&#8209;si</code> |
| `yadm.hostname` | `YADM_HOSTNAME` | Hostname | `hostname` (without domain) | | `yadm.hostname` | `YADM_HOSTNAME` | Hostname | `hostname` (without domain) |
| `yadm.os` | `YADM_OS` | Operating system | <code>uname&nbsp;&#8209;s</code> | | `yadm.os` | `YADM_OS` | Operating system | <code>uname&nbsp;&#8209;s</code> <sup>*</sup> |
| `yadm.user` | `YADM_USER` | Current user | <code>id&nbsp;&#8209;u&nbsp;&#8209;n</code> | | `yadm.user` | `YADM_USER` | Current user | <code>id&nbsp;&#8209;u&nbsp;&#8209;n</code> |
| `yadm.source` | `YADM_SOURCE` | Template filename | (fully qualified path) | | `yadm.source` | `YADM_SOURCE` | Template filename | (fully qualified path) |
<sub><sup>*
The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux".
</sup></sub>
## Supported template processors ## Supported template processors
default default