feat: add components

This commit is contained in:
2025-04-04 17:19:07 +08:00
parent 6f494ec9ca
commit c37b9f0ab2
40 changed files with 2088 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
// https://stackoverflow.com/questions/246007/how-to-determine-whether-a-given-linux-is-32-bit-or-64-bit
// https://stackoverflow.com/questions/106387/is-it-possible-to-detect-32-bit-vs-64-bit-in-a-bash-script
var getOS = () => {
var osName = $STR($$.shell().commands('uname').start()[0]).trim();
var arch = $STR($$.shell().commands('uname', '-m').start()[0]).trim(); // OR getconf LONG_BIT
return {
'name': osName,
'arch': arch
};
};
if (typeof exports == 'object') {
exports.getOS = getOS;
}