chore: update gitconfig structure and add base config
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CONFIG_DIR="$DOTFILES_INSTALL_DIR/.gitconfig.d"
|
||||
CONFIG_DIR="$DOTFILES_INSTALL_DIR/.gitconfig.d/var"
|
||||
|
||||
echo
|
||||
echo "[+] Generating Gitconfig"
|
||||
@ -8,6 +8,8 @@ echo
|
||||
|
||||
rm -f "$HOME/.gitconfig"
|
||||
|
||||
cp "$DOTFILES_INSTALL_DIR/.gitconfig.d/base.gitconfig" "$HOME/.gitconfig"
|
||||
|
||||
for config in "$CONFIG_DIR"/*.gitconfig; do
|
||||
[ -e "$config" ] || continue
|
||||
|
||||
@ -23,7 +25,6 @@ for config in "$CONFIG_DIR"/*.gitconfig; do
|
||||
echo "Create config for $domain"
|
||||
|
||||
cat <<EOF >> "$HOME/.gitconfig"
|
||||
|
||||
[includeIf "hasconfig:remote.*.url:https://**$domain/**"]
|
||||
path = $config
|
||||
EOF
|
||||
|
Reference in New Issue
Block a user