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
e0d6d7f65a
commit
88ea239f58
3 changed files with 10 additions and 0 deletions
1
install
1
install
|
@ -5,5 +5,6 @@ cd -- "$(dirname -- "$0")"
|
|||
(($(id -u) == 0)) \
|
||||
&& [[ -f /etc/debian_version ]] \
|
||||
&& install_apt_packages
|
||||
install_gitconfig
|
||||
install_dotfiles
|
||||
install_addons "$@"
|
||||
|
|
9
mod.bash
9
mod.bash
|
@ -11,6 +11,15 @@ function install_apt_packages() {
|
|||
apt install -y "${packages[@]}"
|
||||
}
|
||||
|
||||
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_dotfiles() {
|
||||
local home
|
||||
local dotfile
|
||||
|
|
Loading…
Add table
Reference in a new issue