Commit 3c15749b authored by Natanael Copa's avatar Natanael Copa

abuild: microoptimization. call git describe only once

Use a global var for last_commit so we dont need call git for every
subpackage
parent 60de2a77
......@@ -808,10 +808,11 @@ EOF
done
fi
local last_commit="$(git_last_commit)$(git_dirty)"
if [ -n "$last_commit" ]; then
echo "commit = $last_commit" >> "$pkginfo"
# store last_commit in global var so we only call git once
if [ -z "$last_commit" ]; then
last_commit="$(git_last_commit)$(git_dirty)"
fi
echo "commit = $last_commit" >> "$pkginfo"
get_maintainer
if [ -n "$maintainer" ]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment