My backup scripts and tools
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

37 lines
733 B

  1. .PHONY: all
  2. all:
  3. @echo
  4. @echo "For initial setup, run"
  5. @echo " sudo ./initial-setup.sh"
  6. @echo
  7. @echo "Or run borg commands with e.g.:"
  8. @echo " ./borg.sh info"
  9. @echo " ./borg.sh list"
  10. @echo
  11. .PHONY: ctrl
  12. ctrl: test-backup
  13. .venv:
  14. mkdir .venv
  15. pipenv install --dev
  16. .PHONY: test-backup
  17. test-backup: .venv
  18. .venv/bin/mypy backup.py
  19. ./backup.py | tr '\0' '\n' #-n
  20. .PHONY: test-setup
  21. test-setup:
  22. shellcheck -f gcc initial-setup.sh
  23. rm -rf /tmp/test-borg
  24. mkdir /tmp/test-borg
  25. git clone . /tmp/test-borg
  26. #: "normally this would be a git clone, but we want the working tree..."
  27. #git ls-files -z | tar --null -T - -cf - | tar -C /tmp/test-borg -xvf -
  28. /tmp/test-borg/initial-setup.sh
  29. .PHONY: clean
  30. clean:
  31. rm -f README.html