Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./register.sh overwrites/deletes backup #76

Open
AnotherNeko opened this issue Jun 17, 2022 · 3 comments
Open

./register.sh overwrites/deletes backup #76

AnotherNeko opened this issue Jun 17, 2022 · 3 comments

Comments

@AnotherNeko
Copy link

running ./register.sh more than once seems to delete the backup it had created previously, which goes against the idea of backups, where you probably want to keep all versions but with different names.

@ChristophHaag
Copy link
Owner

True, I wrote it as a minimal one off script. I think the quickest way would be to print an error and refuse to do anything if the target file already exists.

@AnotherNeko
Copy link
Author

what I found easier was including (part of) the Unix time in the filename, that way no two files would have the same name. I'll see if I can come up with a decent-looking PR.

@AnotherNeko
Copy link
Author

I tested that change #77 on my system and it seems to work, and it should work on any other system that has the same mv command, although I didn't test it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants