tools: add set-env-variables.sh

Very simple script to set env variables.
This commit is contained in:
Jakub Rusz 2022-04-08 14:37:30 +02:00 committed by Ondřej Budai
parent a5b42a84f2
commit 62f2bf608c
2 changed files with 8 additions and 2 deletions

View file

@ -37,8 +37,7 @@ function template_override {
}
# Get OS and architecture details.
source /etc/os-release
ARCH=$(uname -m)
source tools/set-env-variables.sh
# Register RHEL if we are provided with a registration script and intend to do that.
REGISTER="${REGISTER:-'false'}"

View file

@ -0,0 +1,7 @@
#!/bin/bash
# don't error on unused ARCH and DISTRO_CODE variables
# shellcheck disable=SC2034
source /etc/os-release
ARCH=$(uname -m)
DISTRO_CODE="${DISTRO_CODE:-${ID}-${VERSION_ID//./}}"