add configure_git
This commit is contained in:
parent
da420e4c48
commit
25f6644370
5
files/.gitconfig
Normal file
5
files/.gitconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[user]
|
||||||
|
email = nanoapezlk@gmail.com
|
||||||
|
name = Konano
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
11
init_root.sh
11
init_root.sh
@ -217,6 +217,16 @@ configure_miniconda() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_git() {
|
||||||
|
[ -f ~/.gitconfig ] && return
|
||||||
|
|
||||||
|
read -p "要配置 git 吗?[N]: " response
|
||||||
|
|
||||||
|
if [[ $response =~ ^[Yy]$ ]]; then
|
||||||
|
cp $scriptdir/files/.gitconfig ~/.gitconfig
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_google_access
|
check_google_access
|
||||||
configure_ssh
|
configure_ssh
|
||||||
configure_ssh_keygen
|
configure_ssh_keygen
|
||||||
@ -232,3 +242,4 @@ configure_hostname
|
|||||||
configure_timedate
|
configure_timedate
|
||||||
configure_fail2ban
|
configure_fail2ban
|
||||||
configure_miniconda
|
configure_miniconda
|
||||||
|
configure_git
|
||||||
|
|||||||
11
init_sudo.sh
11
init_sudo.sh
@ -223,6 +223,16 @@ configure_miniconda() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_git() {
|
||||||
|
[ -f ~/.gitconfig ] && return
|
||||||
|
|
||||||
|
read -p "要配置 git 吗?[N]: " response
|
||||||
|
|
||||||
|
if [[ $response =~ ^[Yy]$ ]]; then
|
||||||
|
cp $scriptdir/files/.gitconfig ~/.gitconfig
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_google_access
|
check_google_access
|
||||||
configure_ssh
|
configure_ssh
|
||||||
configure_ssh_keygen
|
configure_ssh_keygen
|
||||||
@ -238,3 +248,4 @@ configure_hostname
|
|||||||
configure_timedate
|
configure_timedate
|
||||||
configure_fail2ban
|
configure_fail2ban
|
||||||
configure_miniconda
|
configure_miniconda
|
||||||
|
configure_git
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user