abuild: microoptimization. call git describe only once

Use a global var for last_commit so we dont need call git for every
subpackage
This commit is contained in:
Natanael Copa 2013-07-23 07:17:37 +00:00
parent 60de2a776a
commit 3c15749bd0

View File

@ -808,10 +808,11 @@ EOF
done done
fi fi
local last_commit="$(git_last_commit)$(git_dirty)" # store last_commit in global var so we only call git once
if [ -n "$last_commit" ]; then if [ -z "$last_commit" ]; then
echo "commit = $last_commit" >> "$pkginfo" last_commit="$(git_last_commit)$(git_dirty)"
fi fi
echo "commit = $last_commit" >> "$pkginfo"
get_maintainer get_maintainer
if [ -n "$maintainer" ]; then if [ -n "$maintainer" ]; then