#!/bin/sh -e ## # variables localbase=${LOCALBASE:-/usr/local} git="${localbase}"/bin/git gitdir=$1 commit=$2 mode=u=rwX,g=rX,o= ## # functions gitexec() { doas -n -u _srczap \ /bin/sh -c "umask ${mode}; ${git} ${1}" } ## # main cd "${gitdir}" add=$(gitexec "diff --name-only --diff-filter=A ${commit} HEAD") mod=$(gitexec "diff --name-only --diff-filter=M ${commit} HEAD") echo "${add}" echo "${mod}"