Compare commits
No commits in common. "324e4cfcb6afa5a0d7bbffd6a61b52df68ab81ed" and "c8b2e4d3266781a39e4180f4abd8e23531b49082" have entirely different histories.
324e4cfcb6
...
c8b2e4d326
@ -484,19 +484,12 @@ configure_git_gpg() {
|
|||||||
[ -n "$(git config --global user.signingkey)" ] && return
|
[ -n "$(git config --global user.signingkey)" ] && return
|
||||||
|
|
||||||
if confirm_action "要配置 git 使用 gpg 签名吗?" "N"; then
|
if confirm_action "要配置 git 使用 gpg 签名吗?" "N"; then
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if ! command_exists 7za; then
|
||||||
if ! command_exists 7z; then
|
sudo apt install p7zip-full -y
|
||||||
brew install p7zip
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if ! command_exists 7za; then
|
|
||||||
sudo apt install p7zip-full -y
|
|
||||||
alias 7z=7za
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
read_password
|
read_password
|
||||||
cp $scriptdir/files/git.key.zip $tempdir/git.key.zip
|
cp $scriptdir/files/git.key.zip $tempdir/git.key.zip
|
||||||
7z x -p$password $tempdir/git.key.zip -o$tempdir > /dev/null 2>&1
|
7za x -p$password $tempdir/git.key.zip -o$tempdir > /dev/null 2>&1
|
||||||
rm $tempdir/git.key.zip
|
rm $tempdir/git.key.zip
|
||||||
if [ ! -s $tempdir/git.key ]; then
|
if [ ! -s $tempdir/git.key ]; then
|
||||||
echo "Wrong password!"
|
echo "Wrong password!"
|
||||||
|
|||||||
@ -44,11 +44,6 @@ configure_gpg() {
|
|||||||
mkdir -p ~/.gnupg
|
mkdir -p ~/.gnupg
|
||||||
chmod 700 ~/.gnupg
|
chmod 700 ~/.gnupg
|
||||||
cp $scriptdir/files/gpg.conf ~/.gnupg/gpg.conf
|
cp $scriptdir/files/gpg.conf ~/.gnupg/gpg.conf
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
|
||||||
if ! command_exists gpg; then
|
|
||||||
brew install gpg
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user