Closed sigboe closed 1 year ago
Sorry about the force push, I like consistency and I forgot a bash-ism, so I just added that and squashed it with the commit that made the case statement
Tested on Dell XPS 9320 with kernel 6.1.11-arch1-1, got a valid stream with test.sh
. It would be nice the rework the name of second commit (way too long)
@Tropicao Hahahah, at work we don't read so much commit messages, I made it more concise now
@Tropicao Hahahah, at work we don't read so much commit messages, I made it more concise now
Thanks. That's not only a "personal preference/comestic" suggestion ; since that repository is subject to recurrent breaks/needs of debugging, I feel that we should keep git history easy to read :wink:
I never really used test.sh
that much, but your version does seem to work much better.
Also, something interesting: Your version seems to work, while neither the original one nor something like OBS do (they did this morning when I reinstalled the modules with --force
, huh).
For me auto-convert simply doesn't work. Back when I originally found this repo I saw the format string in the setting for v4l2-relayd, and I used that in this test script and it works for me. Please test the test first. I mean it should work since it's the same as in v4l2-relayd.
Also it didn't quite sit well with me to just test if X11 is running. What if the user has a nested x11 environment or runs X11 on another tty, or another monitor? So I switched it over to check $XDG_SESSION_TYPE instead. And what is faster to run between a case statement and if-elif, well case is almost twice as fast. case is not in all posix shells, so if the user has followed the suggestion in the arch wiki to switch /bin/sh to not be symlinked to bash then it will fail. So I converted the script over to bash instead of posix. :rofl: Sorry I know I mentioned in the other PR that I didn't see a need to do that, but case is better than if-elif so.