Only set up Fossil checkin signing when key exists
This commit is contained in:
parent
1fca49fa40
commit
79ca5807f4
1 changed files with 14 additions and 4 deletions
18
setup.sh
18
setup.sh
|
@ -24,13 +24,23 @@ if have fossil; then
|
||||||
fossil set --global autosync 0
|
fossil set --global autosync 0
|
||||||
fossil set --global editor 'vim -c "se ft=gitcommit"'
|
fossil set --global editor 'vim -c "se ft=gitcommit"'
|
||||||
fossil set --global mv-rm-files 1
|
fossil set --global mv-rm-files 1
|
||||||
gpg_args="-u 35E1AF8B --clearsign -o"
|
|
||||||
if have gpg2; then
|
if have gpg2; then
|
||||||
fossil set --global clearsign 1
|
gpg="gpg2"
|
||||||
fossil set --global pgp-command "gpg2 $gpg_args"
|
|
||||||
elif have gpg; then
|
elif have gpg; then
|
||||||
|
gpg="gpg"
|
||||||
|
else
|
||||||
|
gpg=":"
|
||||||
|
fi
|
||||||
|
|
||||||
|
gpg_key="35E1AF8B"
|
||||||
|
if test $($gpg -a --export $gpg_key 2>/dev/null | wc -c) -gt 0; then
|
||||||
|
fossil set --global pgp-command \
|
||||||
|
"$gpg -u $gpg_key --clearsign -o"
|
||||||
fossil set --global clearsign 1
|
fossil set --global clearsign 1
|
||||||
fossil set --global pgp-command "gpg $gpg_args"
|
else
|
||||||
|
fossil unset --global pgp-command
|
||||||
|
fossil unset --global clearsign
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
have git && link_file git .config/git ../
|
have git && link_file git .config/git ../
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue