add configure_git

This commit is contained in:
Konano 2023-07-23 17:35:55 +08:00
parent da420e4c48
commit 25f6644370
3 changed files with 27 additions and 0 deletions

5
files/.gitconfig Normal file
View File

@ -0,0 +1,5 @@
[user]
email = nanoapezlk@gmail.com
name = Konano
[init]
defaultBranch = main

View File

@ -217,6 +217,16 @@ configure_miniconda() {
fi
}
configure_git() {
[ -f ~/.gitconfig ] && return
read -p "要配置 git 吗?[N]: " response
if [[ $response =~ ^[Yy]$ ]]; then
cp $scriptdir/files/.gitconfig ~/.gitconfig
fi
}
check_google_access
configure_ssh
configure_ssh_keygen
@ -232,3 +242,4 @@ configure_hostname
configure_timedate
configure_fail2ban
configure_miniconda
configure_git

View File

@ -223,6 +223,16 @@ configure_miniconda() {
fi
}
configure_git() {
[ -f ~/.gitconfig ] && return
read -p "要配置 git 吗?[N]: " response
if [[ $response =~ ^[Yy]$ ]]; then
cp $scriptdir/files/.gitconfig ~/.gitconfig
fi
}
check_google_access
configure_ssh
configure_ssh_keygen
@ -238,3 +248,4 @@ configure_hostname
configure_timedate
configure_fail2ban
configure_miniconda
configure_git