diff --git a/.gitconfig b/gitconfig similarity index 100% rename from .gitconfig rename to gitconfig diff --git a/install b/install index a392588..43d745b 100755 --- a/install +++ b/install @@ -6,5 +6,6 @@ if (($(id -u) == 0)); then [[ -f /etc/debian_version ]] \ && install_apt_packages fi +install_gitconfig install_dotfiles install_addons "$@" diff --git a/mod.bash b/mod.bash index 10babd6..76ba3c5 100644 --- a/mod.bash +++ b/mod.bash @@ -13,6 +13,15 @@ function install_dotfiles() { done } +function install_gitconfig() { + if (($(id -u) == 0)); then + sudo --user="#${SUDO_UID:-0}" \ + git config --global --add include.path "$(realpath gitconfig)" + else + git config --global --add include.path "$(realpath gitconfig)" + fi +} + function install_apt_packages() { local packages local apt_sources_dir