Capture git identification during install

This commit is contained in:
David Heinemeier Hansson
2025-05-18 13:37:03 +02:00
parent b8559b7435
commit f9e676a867
3 changed files with 9 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ source ~/.local/share/omakub/install/check-version.sh
echo "Get ready to make a few choices..."
source ~/.local/share/omakub/install/terminal/required/app-gum.sh >/dev/null
source ~/.local/share/omakub/install/first-run-choices.sh
source ~/.local/share/omakub/install/git-identification.sh
# Desktop software and tweaks will only be installed if we're running Gnome
if [[ "$XDG_CURRENT_DESKTOP" == *"GNOME"* ]]; then

View File

@@ -0,0 +1,4 @@
echo "Enter git identification..."
SYSTEM_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1)
export OMAKUB_GIT_NAME=$(gum input --placeholder "Enter full name" --value "$SYSTEM_NAME" --prompt "Name> ")
export OMAKUB_GIT_EMAIL=$(gum input --placeholder "Enter email address" --prompt "Email> ")

View File

@@ -4,3 +4,7 @@ git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global pull.rebase true
# Set identification from install inputs
git config --global user.name $OMAKUB_GIT_NAME
git config --global user.email $OMAKUB_GIT_EMAIL