Moving some parts around
This commit is contained in:
29
terminal/git/setup.sh
Executable file
29
terminal/git/setup.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/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
|
||||
|
||||
makedir ${HOME}/bin
|
||||
linkfile ${scriptdir}/prettygit ${HOME}/bin/prettygit
|
||||
linkfile ${scriptdir}/git-on-tree ${HOME}/bin/git-on-tree
|
||||
|
||||
print_ok "Git configured"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user