4 ms·
https://github.com/mdeacey/universal-os-detector?tab=readme-ov-file#integrating-with-other-scripts https://github.com/mdeacey/universal-os-detector?tab=readme-.
by Someone 2y ago
https://github.com/mdeacey/universal-os-detector?tab=readme-ov-file#integrating-with-other-scripts https://github.com/mdeacey/universal-os-detector?tab=readme-...:
“You can easily incorporate the Universal OS Detector into your own scripts with the following one-liner:
source <(curl -sL https://raw.githubusercontent.com/mdeacey/universal-os-detector/main/universal-os-detector.sh) && run_detection
”
Even ignoring the security implications, fetching 11 kilobytes of script over the Internet every time you want to run this should feel like a bad idea to everybody.
Also, if I were to want to run this from my script, I likely would want to act upon its output, and would therefore prefer having functions that output the bare result instead of one function whose output I would have to take apart.