Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / detect-libc / bin / detect-libc.js
diff --git a/legacy-libs/detect-libc/bin/detect-libc.js b/legacy-libs/detect-libc/bin/detect-libc.js
new file mode 100644 (file)
index 0000000..5486127
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env node
+
+'use strict';
+
+var spawnSync = require('child_process').spawnSync;
+var libc = require('../');
+
+var spawnOptions = {
+  env: process.env,
+  shell: true,
+  stdio: 'inherit'
+};
+
+if (libc.isNonGlibcLinux) {
+  spawnOptions.env.LIBC = process.env.LIBC || libc.family;
+}
+
+process.exit(spawnSync(process.argv[2], process.argv.slice(3), spawnOptions).status);