tools: add set-env-variables.sh
Very simple script to set env variables.
This commit is contained in:
parent
a5b42a84f2
commit
62f2bf608c
2 changed files with 8 additions and 2 deletions
|
|
@ -37,8 +37,7 @@ function template_override {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get OS and architecture details.
|
# Get OS and architecture details.
|
||||||
source /etc/os-release
|
source tools/set-env-variables.sh
|
||||||
ARCH=$(uname -m)
|
|
||||||
|
|
||||||
# Register RHEL if we are provided with a registration script and intend to do that.
|
# Register RHEL if we are provided with a registration script and intend to do that.
|
||||||
REGISTER="${REGISTER:-'false'}"
|
REGISTER="${REGISTER:-'false'}"
|
||||||
|
|
|
||||||
7
tools/set-env-variables.sh
Normal file
7
tools/set-env-variables.sh
Normal 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//./}}"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue