linuxdeploy / linuxdeploy-plugin-gstreamer

Bundles GStreamer plugins into AppDirs. Experimental code, please expect issues! Help welcome!
3 stars 11 forks source link

Fix non-elf file skip #6

Closed Stivius closed 2 years ago

Stivius commented 3 years ago

After I did more research on #5 it turned out that the check was wrong. As it was stated in the issue #5, $(...) should return 0 in case of ELF file and 1 otherwise. However, turning a boolean $(...) into a string "$(...)" breaks this condition.

TheAssassin commented 3 years ago

I think what you do there is wrong, too. I'm sure shellcheck would complain about the possible escaping issues.

The code tries to find out whether the command worked, and runs the part after the && only then. No need to interpret stdout at all (in fact, there won't be any, anyway, due to --silent/-q). You can just dump the $ and use a normal subshell (...) && .... (In fact, the subshell wouldn't be needed, but it's definitely cleaner).

TheAssassin commented 2 years ago

Replaced by #13.