26 lines
411 B
Bash
Executable File
26 lines
411 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source ${DOTFILES}/helpers.sh
|
|
|
|
function main()
|
|
{
|
|
local scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
|
|
|
print_info "Configuring git"
|
|
|
|
brewget git
|
|
|
|
if [ ! -f "${HOME}/.gitconfig" ]; then
|
|
cat << EOF > ${HOME}/.gitconfig
|
|
[include]
|
|
path = ${scriptdir}/gitconfig
|
|
[core]
|
|
excludesfile = ${scriptdir}/gitignore_global
|
|
EOF
|
|
fi
|
|
|
|
print_ok "Git configured"
|
|
}
|
|
|
|
main "$@"
|