SteamVR-OpenHMD icon indicating copy to clipboard operation
SteamVR-OpenHMD copied to clipboard

./register.sh overwrites/deletes backup

Open AnotherNeko opened this issue 3 years ago • 3 comments

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.

AnotherNeko avatar Jun 17 '22 20:06 AnotherNeko

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.

ChristophHaag avatar Jun 18 '22 14:06 ChristophHaag

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 avatar Jun 18 '22 20:06 AnotherNeko

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.

AnotherNeko avatar Jun 18 '22 21:06 AnotherNeko