sourcezap/libexec/srczap/git-rev
0x1eef ea06f0dfbc First commit
A modified copy of portzap repurposed for management of the
hardenedbsd source tree.
2024-05-11 16:03:00 -03:00

20 lines
236 B
Bash

#!/bin/sh -e
##
# variables
git=/usr/local/bin/git
gitdir=$1
mode=u=rwX,g=rX,o=
##
# functions
gitexec()
{
doas -n -u _srczap \
/bin/sh -c "umask ${mode}; ${git} ${1}"
}
##
# main
cd "${gitdir}"
gitexec "rev-parse HEAD"