1
0
Fork 0

mock-build.sh: read version from /etc/os-release

This commit is contained in:
Pratham Patel 2024-02-10 09:23:49 +05:30
parent 3f56e6d7a8
commit c8063fa7d2
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ fi
# shellcheck disable=SC1090
source <(grep ID /etc/os-release)
MARCH="$(uname -m)"
DNF_RELEASEVER="$(dnf config-manager --dump-variables | grep 'releasever' | head -n 1 | awk '{print $3}')"
MOCK_ROOT="$ID-$DNF_RELEASEVER-$MARCH"
VERSION_ID="$(source <(grep VERSION_ID /etc/os-release) && awk -F '.' '{print $1}' <<< $VERSION_ID)"
MOCK_ROOT="$ID-$VERSION_ID-$MARCH"
MOCK_OUT="$HOME/mockbuild/out"
if [[ ! -d "/var/lib/mock/$MOCK_ROOT" ]]; then