1
0
mirror of https://github.com/fuse-friends/fuse-native synced 2024-10-27 18:34:01 +00:00
fuse-friends_fuse-native/bin.js
Mathias Buus 3e5e9e8106 add bin
2019-12-17 10:15:33 +01:00

21 lines
422 B
JavaScript
Executable File

#!/usr/bin/env node
const Fuse = require('./')
const cmd = process.argv[2]
if (cmd === 'configure') {
Fuse.configure(onerror)
} else if (cmd === 'unconfigure') {
Fuse.unconfigure(onerror)
} else if (cmd === 'is-configured') {
Fuse.isConfigured(function (err, bool) {
if (err) return onerror(err)
console.log('' + bool)
process.exit(bool ? 0 : 1)
})
}
function onerror (err) {
if (err) throw err
}