Improvements to the build system imported from other projects

This commit is contained in:
Héctor Molinero Fernández
2019-09-02 21:52:36 +02:00
parent 3657a753e1
commit 357e5c5c9b
7 changed files with 127 additions and 127 deletions

View File

@@ -31,7 +31,7 @@ printf '%s' "${UNPRIVILEGED_USER_NAME:?}:${UNPRIVILEGED_USER_PASSWORD:?}" | chpa
unset UNPRIVILEGED_USER_PASSWORD
# Dump environment variables
export-env >> /etc/profile.d/env.sh
export-env > /etc/profile.d/env.sh
# Disable xdummy if there is no graphics card
if [ "${DISABLE_GPU:?}" = 'true' ] || [ ! -d /dev/dri/ ]; then
@@ -39,7 +39,7 @@ if [ "${DISABLE_GPU:?}" = 'true' ] || [ ! -d /dev/dri/ ]; then
fi
# Create RANDFILE if it does not exist
RANDFILE=${RANDFILE-${HOME}/.rnd}
RANDFILE=${RANDFILE-${HOME:?}/.rnd}
if [ ! -f "${RANDFILE:?}" ]; then
dd if=/dev/urandom of="${RANDFILE:?}" bs=256 count=1 >/dev/null 2>&1
fi

View File

@@ -1,12 +1,9 @@
#!/usr/bin/awk -f
BEGIN {
print("\n")
for (v in ENVIRON) {
if (v !~ /^(PWD|HOME|SHELL|HOSTNAME|UID|USER|GID|GROUP)$/) {
gsub(/[^0-9A-Za-z_]/, "_", v);
gsub(/'/, "'\\''", ENVIRON[v])
print("export "v"='"ENVIRON[v]"'")
}
BEGIN {for (v in ENVIRON) {
if (v !~ /^(_|AWKPATH|AWKLIBPATH|TERM|SHLVL|PWD|HOME|SHELL|HOSTNAME|UID|USER|GID|GROUP)$/) {
gsub(/[^0-9A-Za-z_]/, "_", v);
gsub(/'/, "'\\''", ENVIRON[v])
print("export "v"='"ENVIRON[v]"'")
}
}
}}