Initial python virtual environment support.

This commit is contained in:
Doncho Gunchev 2024-07-14 16:19:38 +03:00
parent 45d926a3a9
commit 58223f0e8a
No known key found for this signature in database
GPG key ID: D3FF0619433A66E2
3 changed files with 24 additions and 12 deletions

View file

@ -8,15 +8,15 @@ rpm_ver="${ver%%-*}"
rpm_rev="${ver#*-}"
rpm_numeric_rev="${rpm_rev%%-*}"
change="* $(date +'%a %b %d %Y') $(git log -1 --format='%aN <%aE>') - ${rpm_ver}-${rpm_numeric_rev}
- $(git log -1 --format=%s)
"
change1="* $(date +'%a %b %d %Y') $(git log -1 --format='%aN <%aE>') - ${rpm_ver}-${rpm_numeric_rev}"
change2="- $(git log -1 --format=%s)"
awk -v change="${change}" '/^%changelog/ {print; print change; next} 1' gwebu-profile.spec.in \
awk -v change1="${change1}" -v change2="${change2}" '/^%changelog/ {print; print change1; print change2; print ""; next} 1' gwebu-profile.spec.in \
> gwebu-profile.spec.tmp && mv gwebu-profile.spec.tmp gwebu-profile.spec.in
sed -i "s/Version: .*/Version: ${rpm_ver}/" gwebu-profile.spec.in
sed -i "s/Release: .*/Release: ${rpm_numeric_rev}/" gwebu-profile.spec.in
sed -i.bak "s/Version: .*/Version: ${rpm_ver}/" gwebu-profile.spec.in
sed -i.bak "s/Release: .*/Release: ${rpm_numeric_rev}/" gwebu-profile.spec.in
rm -f gwebu-profile.spec.in.bak
git add gwebu-profile.spec.in