particle-os-cli/templates/export.sh
2024-01-01 18:38:39 +00:00

8 lines
189 B
Bash

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