chore: Prepare for the v0.9.0 release
This commit is contained in:
parent
cb4acbadeb
commit
2069eb513a
9 changed files with 23 additions and 296 deletions
|
|
@ -1,23 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Function to retrieve module configs and populate an array
|
||||
# Arguments:
|
||||
# 1. Variable name to store result
|
||||
# 2. jq query
|
||||
# 3. Module config content
|
||||
get_yaml_array() {
|
||||
local -n arr="${1}"
|
||||
local jq_query="${2}"
|
||||
local module_config="${3}"
|
||||
|
||||
if [[ -z "${jq_query}" || -z "${module_config}" ]]; then
|
||||
echo "Usage: get_yaml_array VARIABLE_TO_STORE_RESULTS JQ_QUERY MODULE_CONFIG" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
readarray -t arr < <(echo "${module_config}" | yq -I=0 "${jq_query}")
|
||||
}
|
||||
|
||||
# Function to retrieve module configs and populate an array
|
||||
# Arguments:
|
||||
# 1. Variable name to store result
|
||||
|
|
@ -67,7 +49,6 @@ export OS_VERSION="$(grep -Po "(?<=VERSION_ID=)\d+" /usr/lib/os-release)"
|
|||
export OS_ARCH="$(uname -m)"
|
||||
|
||||
# Export functions for use in sub-shells or sourced scripts
|
||||
export -f get_yaml_array
|
||||
export -f get_json_array
|
||||
|
||||
mkdir -p /var/roothome /var/opt /var/lib/alternatives /var/opt /var/usrlocal
|
||||
|
|
|
|||
|
|
@ -18,4 +18,3 @@ if [ -f /etc/os-release ]; then
|
|||
echo "OS not detected, proceeding without setup"
|
||||
fi
|
||||
fi
|
||||
cp /tmp/bins/yq /usr/bin/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue