From 9ee7d5231513ef7bd51d51dac73693922814cde2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 6 May 2026 12:25:09 +0200 Subject: feat: files.list replaces hardcoded array when non-empty Previously files.list appended to the built-in DOTFILES array, causing duplicate processing. Now a non-empty files.list replaces the array entirely; missing or empty file falls back to the hardcoded defaults. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1a5f0ed..d75e366 100644 --- a/README.md +++ b/README.md @@ -135,15 +135,18 @@ GIT_BRANCH="master" ## Adding Files -**Edit the script** — add paths to the `DOTFILES` array in `dot-backup.sh`. - -**Or use the external list** — add paths to `~/.config/dot-backup/files.list`, one per line: +**External list (recommended)** — create `~/.config/dot-backup/files.list` with one path per line. When this file exists and is non-empty it replaces the built-in list entirely: ``` -# extra dotfiles -.config/myapp -.config/otherapp.conf +# shell +.bashrc +.bash_aliases + +# system files /etc/hosts +/etc/fstab ``` +**Built-in fallback** — if `files.list` is missing or empty, the script uses the `DOTFILES` array hardcoded in `dot-backup.sh`. + Relative paths are treated as `$HOME`-relative. Absolute paths (starting with `/`) are treated as system files. -- cgit v1.2.3