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.
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
11 # If the file exists don't regenerate it again.
12 if [ -s ${GITREVS_FILE} ]; then
16 if [ -z "$XBPS_GIT_REVS" ]; then
17 msg_error
"BUG: XBPS_GIT_REVS is not set\n"
21 echo "${sourcepkg}:${XBPS_GIT_REVS}"
22 echo "${sourcepkg}:${XBPS_GIT_REVS}" > $GITREVS_FILE