https://github.com/ryansch/dotbot-ifarch
Conditional execution of dotbot directives based on the local architecture
https://github.com/ryansch/dotbot-ifarch
dotbot dotbot-plugin
Last synced: 3 months ago
JSON representation
Conditional execution of dotbot directives based on the local architecture
- Host: GitHub
- URL: https://github.com/ryansch/dotbot-ifarch
- Owner: ryansch
- License: mit
- Created: 2022-01-24T18:12:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-01T18:02:08.000Z (over 1 year ago)
- Last Synced: 2025-03-11T00:08:19.279Z (3 months ago)
- Topics: dotbot, dotbot-plugin
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotbot-ifarch
Conditional execution of dotbot directives based on the local architecture with thanks to [dotbot-ifplatform](https://github.com/ssbanerje/dotbot-ifplatform).
## Prerequisites
This plugin requires [`dotbot`](https://github.com/anishathalye/dotbot) to be installed.## Installation
1. Run `git submodule add https://github.com/ryansch/dotbot-ifarch.git`
2. Run `git submodule update --init --recursive`
3. Pass in the CLI argument `--plugin-dir dotbot-ifarch` when executing the `dotbot` executable.## Usage
Add the `if` directive to the `dotbot` YAML file to conditionally execute the directives.
For example:```yaml
- ifaarch64:
- shell:
- echo Raspberry pi?- ifarm64:
- shell:
- echo Apple Silicon?- ifx86_64:
- shell:
- echo Intel/AMD
```### Details
The plugin queries the local architecture using the `platform` module which uses `uname -m`.
Acceptable values of `` in the `if` directive are shown below:- `aarch64`
- `arm64`
- `armv7l`
- `x86_64`NOTE: Issues/PRs will be accepted to help fill out this list.