diff --git a/config/config_git.sh b/config/config_git.sh index 1af66bd..7cb0fe3 100644 --- a/config/config_git.sh +++ b/config/config_git.sh @@ -2,4 +2,6 @@ # shellcheck disable=SC2034 -CONFIG_SERVER_GIT="https://gitea.server.home/" \ No newline at end of file +CONFIG_GIT_SERVER="https://gitea.server.home/" +CONFIG_GIT_USER="Frogg" +CONFIG_GIT_EMAIL="admin@frogg.fr" diff --git a/func/git.sh b/func/git.sh index c9809eb..4379351 100644 --- a/func/git.sh +++ b/func/git.sh @@ -23,10 +23,12 @@ getbranch(){ gitinit(){ git init + git config user.name "${1:-$CONFIG_GIT_SERVER}" + git config user.email "${2:-$CONFIG_GIT_SERVER}" git add . git commit -m "Initial commit" git branch -M main - git remote add origin "${1:-$CONFIG_SERVER_GIT}" + git remote add origin "${3:-$CONFIG_GIT_SERVER$(basename "$(pwd)")}" git push -u origin main }