mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
19 lines
655 B
Bash
Executable File
19 lines
655 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
: "${USER_EMAIL:?required but not set}"
|
|
|
|
: "${SIGNING_KEY:=$(\
|
|
gpg --list-keys --keyid-format short "${USER_EMAIL}" \
|
|
| grep --extended-regexp '^pub[[:blank:]]+[[:alnum:]]+/[[:alnum:]]+[[:blank:]].*\[[[:upper:]]*S[[:upper:]]*\]' \
|
|
| awk '{print $2}' \
|
|
| cut -d '/' -f 2 )}"
|
|
: "${SIGNING_KEY:?something went wrong}"
|
|
|
|
for REPOSITORY in $(find $@ -type d -name .git -exec dirname {} +)
|
|
do
|
|
git -C "$REPOSITORY" config --local user.email "$USER_EMAIL"
|
|
git -C "$REPOSITORY" config --local user.signingKey "$SIGNING_KEY"
|
|
git -C "$REPOSITORY" config --local commit.gpgsign true
|
|
git -C "$REPOSITORY" --no-pager config --list --show-origin
|
|
done
|