Files
dotfiles/installer/git.sh
T

19 lines
444 B
Bash
Executable File

#!/bin/sh -e
if [[ ! -x "$(command -v git)" ]]; then
paru -Sy --needed --noconfirm git
fi
${DOTFILES_DIR}/sync-config config/git
GIT_CONFIG="${HOME}/.config/git/local"
# Set identification from install inputs
if [[ -n "${SJB_USER_NAME//[[:space:]]/}" ]]; then
git config -f ${GIT_CONFIG} user.name "$SJB_USER_NAME"
fi
if [[ -n "${SJB_USER_EMAIL//[[:space:]]/}" ]]; then
git config -f ${GIT_CONFIG} user.email "$SJB_USER_EMAIL"
fi