mirror of
https://github.com/kou029w/dotfiles.git
synced 2025-01-18 08:05:01 +00:00
use include gitconfig
This commit is contained in:
parent
76a57dcd91
commit
2fae9e358a
3 changed files with 10 additions and 0 deletions
1
install
1
install
|
@ -6,5 +6,6 @@ if (($(id -u) == 0)); then
|
|||
[[ -f /etc/debian_version ]] \
|
||||
&& install_apt_packages
|
||||
fi
|
||||
install_gitconfig
|
||||
install_dotfiles
|
||||
install_addons "$@"
|
||||
|
|
9
mod.bash
9
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
|
||||
|
|
Loading…
Add table
Reference in a new issue