limine: update to 8.6.0.
[void-pkg.git] / common / hooks / post-install / 05-generate-gitrevs.sh
blobc5a51f0d10124eef02b30bb528b2e97893f4b823
1 # This hook generates a file ${XBPS_STATEDIR}/gitrev with the last
2 # commit sha1 (in short mode) for source pkg if XBPS_USE_GIT_REVS is enabled.
4 hook() {
5 local GITREVS_FILE=${XBPS_STATEDIR}/gitrev
7 # If XBPS_USE_GIT_REVS is disabled in conf file don't continue.
8 if [ -z $XBPS_USE_GIT_REVS ]; then
9 return
11 # If the file exists don't regenerate it again.
12 if [ -s ${GITREVS_FILE} ]; then
13 return
16 if [ -z "$XBPS_GIT_REVS" ]; then
17 msg_error "BUG: XBPS_GIT_REVS is not set\n"
20 cd $XBPS_SRCPKGDIR
21 echo "${sourcepkg}:${XBPS_GIT_REVS}"
22 echo "${sourcepkg}:${XBPS_GIT_REVS}" > $GITREVS_FILE