Skip to content

Commit df2561f

Browse files
committed
✨ feat: Improved gitconfig with qustodio only local settings
1 parent b3eba81 commit df2561f

3 files changed

Lines changed: 37 additions & 11 deletions

File tree

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Local overrides not to be committed
2-
zsh/.zshrc.local
3-
git/.gitconfig.local
2+
zsh/zshrc.local
3+
git/gitconfig.local
4+
git/gitconfig_qustodio
45
*.secret
56
*.env

git/gitconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[user]
22
name = Antonio Molina
3-
email = antonio.molina@qustodio.com
3+
email = aydevosotros@gmail.com
44

55
[color]
66
ui = auto
@@ -76,3 +76,7 @@
7676
[credential]
7777
helper = store
7878

79+
# Qustodio specific
80+
[includeIf "gitdir:~/qustodio/"]
81+
path = ~/.gitconfig_qustodio
82+

install.sh

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
11
#!/bin/bash
2-
set -e
2+
# Simple dotfiles installer for Antonio
3+
set -euo pipefail
4+
5+
# Always work from the directory where this script lives
6+
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+
8+
link_optional_config() {
9+
local source_path="$1"
10+
local target_path="$2"
11+
local label="$3"
12+
13+
if [ -f "$source_path" ]; then
14+
echo "🔗 Linking $label"
15+
ln -sf "$source_path" "$target_path"
16+
echo "$label installed."
17+
else
18+
echo "⚪️ Skipping $label (not found)."
19+
fi
20+
}
321

422
if ! command -v fzf >/dev/null 2>&1; then
5-
echo "⚠️ Missing dependency: fzf"
6-
echo " Please install fzf (e.g., 'sudo pacman -S fzf') and re-run this script."
7-
exit 1
23+
echo "⚠️ Missing dependency: fzf"
24+
echo " Please install fzf (e.g., 'sudo pacman -S fzf') and re-run this script."
25+
exit 1
826
fi
927

1028
echo "🔗 Linking zsh config…"
11-
ln -sf "$PWD/zsh/.zshrc" "$HOME/.zshrc"
29+
ln -sf "$REPO_DIR/zsh/.zshrc" "$HOME/.zshrc"
1230

13-
echo "🔗 Linking git config…"
14-
ln -sf "$PWD/git/gitconfig" "$HOME/.gitconfig"
31+
echo "🔗 Linking main git config…"
32+
ln -sf "$REPO_DIR/git/gitconfig" "$HOME/.gitconfig"
1533

16-
echo "✨ Done! Reload your shell."
34+
link_optional_config "$REPO_DIR/git/gitconfig_qustodio" "$HOME/.gitconfig_qustodio" "Qustodio git config"
35+
link_optional_config "$REPO_DIR/git/gitconfig_local" "$HOME/.gitconfig_local" "local git config"
36+
link_optional_config "$REPO_DIR/git/gitignore_global" "$HOME/.gitignore_global" "global gitignore"
1737

38+
echo "✨ Done! Reload your shell or start a new terminal."

0 commit comments

Comments
 (0)