Personal dotfiles repository.
motherscript.sh is the core logic layer for all setup scripts in this repo. It provides:
- Safe symlinking (
safe_link_file) - Directory creation with confirmation (
safe_ensure_dir) - Safe deletion with confirmation (
safe_remove_dir) - Smart logging with icons and color (
log_info,log_warn,log_success, etc.) - Support for flags like:
| Flag | Description |
|---|---|
--dry-run |
Simulate actions without actually doing them |
--debug |
Show extra debug output |
--yes |
Auto-confirm prompts (useful in scripts or CI) |
You can pass these flags to any install script that uses motherscript.sh:
./install-terminal-dotfiles.sh --dry-run
./install-shared-dotfiles.sh --yes --debug- Make the script executable (only needed once):
chmod +x ./install-*.shYou can optionally make motherscript.sh executable, but it's not required since it’s sourced.
- Run an install script:
./install-shared-dotfiles.shThis repository is built for personal workflows, where symbolic links maintain consistency across environments.
Some benefits:
-
Easily sync dotfiles between machines
-
Avoid duplicate configs
-
Quickly bootstrap a new machine
⚠️ Always verify scripts and back up any important config files before running.
Here’s how the symlink logic handles different scenarios:
✅ Existing symlink (correct target): Nothing is done.
🔁 Existing symlink (wrong target): It will be replaced.
🧹 Broken symlink: It will be removed and replaced.
🚫 Real file or folder exists: You'll be prompted to delete it (unless using --yes).
🛑 Dangerous paths (like /, $HOME, /etc) are protected and cannot be removed.
🪄 Non-existent folders will be created with confirmation.
Overwriting: ~/.bashrc
✔️ Linked: ~/.bashrc → ~/dotfiles/bash/bashrc- Add --force flag to skip all prompts but still warn
- Compatibility checks for different shells (zsh, fish)