+ logic for method backup()

This commit is contained in:
Ferit Yiğit BALABAN 2023-02-10 22:46:54 +03:00
parent 2d2616febf
commit 2b6004a7b3

View File

@ -174,6 +174,23 @@ def commit_then_push():
return 1, None return 1, None
def backup():
"""
Aggresively executes the steps to do checksum comparisons between local
config directory and local repository to decide which files to copy,
copy only changed files, commit and push to remote.
"""
# get list of files and directories to change (F_DEPLOY)
# get list of checksums of (F_DEPLOY), compute and compare with local repository
# if checksum(local_config) != checksum(local_repo)
# copy local_config to local_repo
# if exists(local_config in local_repo) is False
# copy local_config to local_repo
# if exists(F_DEPLOY) but not in local_config
# warn for lost file, user must either copy from local_repo to local_config or delete from F_DEPLOY
# exec git commit -m "[message]" && git push
def deploy(): def deploy():
""" """
Kindly executes the steps to get a up-to-date local repository, Kindly executes the steps to get a up-to-date local repository,