0x1eef
ea06f0dfbc
A modified copy of portzap repurposed for management of the hardenedbsd source tree.
20 lines
236 B
Bash
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"
|