particle-os-cli/template/templates/export.sh
Gerald Pinder 910e0434b6
refactor: Move templates to their own crate (#83)
This PR logically separates out parts of the code to their own crates. This will be useful for future Tauri App development.
2024-02-25 14:45:33 -06:00

8 lines
192 B
Bash

#!/usr/bin/env bash
get_yaml_array() {
readarray -t "$1" < <(echo "$3" | yq -I=0 "$2")
}
export -f get_yaml_array
export OS_VERSION=$(grep -Po '(?<=VERSION_ID=)\d+' /usr/lib/os-release)