ChristophHaag / SteamVR-OpenHMD

SteamVR plugin for using OpenHMD drivers in SteamVR
Boost Software License 1.0
194 stars 33 forks source link

./register.sh overwrites/deletes backup #76

Open AnotherNeko opened 2 years ago

AnotherNeko commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.