aboutsummaryrefslogtreecommitdiffstats
path: root/dot-backup.sh
AgeCommit message (Collapse)AuthorFilesLines
2 daysfix: create parent dir before rsync for file targetsHEADmasterDanilo M.1-0/+1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 daysfeat: files.list replaces hardcoded array when non-emptyDanilo M.1-1/+11
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 <noreply@anthropic.com>
2 daysfeat: skip system files on restore when not rootDanilo M.1-1/+21
Warn and skip system/ entries during restore if EUID != 0. Dry-run shows what would be restored (with "needs root" note) so user can decide whether to re-run as root.
2 daysfix: log_verbose exits 1 under set -e when VERBOSE=falseDanilo M.1-1/+1
`[[ false ]]` returns exit code 1; `set -euo pipefail` killed restore loop on first skipped entry. Add `|| true` to suppress. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 daysfix: harden error handling and fix silent failuresDanilo M.1-21/+18
- guard all cd calls with error messages - check commit and push exit codes; fail loudly on hook rejection - warn on missing system path entries (were silently skipped) - clear only when stdout is a terminal - simplify beginswith to single [[ ]] expression - remove redundant touch before lastupdate write - quote $NC in echo -e calls
2 daysStop first run from backing up before user configuresDanilo M.1-1/+2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 daysFix remaining review issues: quoting and clear behaviourDanilo M.1-8/+8
- Quote $WORKDIR in all cd calls - Quote ${HOME}/$i and $i in -f/-d test expressions - Guard clear with QUIET check to avoid wiping terminal in scripted use Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 daysFix review findings: quoting, set -e trap, system path, push guardDanilo M.1-14/+14
- Quote all $DEFAULT_OUTPUT_DIR references to handle paths with spaces - Replace git rev-parse $(...) with exit-code check to avoid set -e trap - Fix system file dst using $i instead of ${i#/} (double-slash bug) - Quote $i in beginswith call - Simplify push guard to check remote existence directly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 daysAdd GIT_REMOTE, GIT_BRANCH config options and --push flagDanilo M.1-2/+34
- GIT_REMOTE in config auto-registers origin on every run (idempotent) - GIT_BRANCH sets push target branch (defaults to current branch) - -p/--push pushes after commit; errors if no remote available - Updated config.example and README Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 daysBootstrap config dirs on first run with setup messageDanilo M.1-1/+18
Script now creates ~/.config/dot-backup/ and ~/.local/share/dot-backup/ on first run and prints a summary with next steps. README updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 daysAdd flags, config system, restore mode, and updated docsDanilo M.1-45/+202
- Add -n/--dry-run, -v/--verbose, -r/--restore, -q/--quiet flags - Auto-commit after backup with timestamp message - Load ~/.config/dot-backup/config for overriding defaults - Load extra dotfiles from ~/.config/dot-backup/files.list - Quiet mode redirects all output to ~/.local/share/dot-backup/backup.log - Add config.example, CLAUDE.md, and updated README Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-06Added script and readmeDanilo M.1-0/+192