You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
352 B
22 lines
352 B
4 years ago
|
var fs = require('fs')
|
||
|
var paths = ['C:/libjpeg-turbo']
|
||
|
|
||
|
if (process.arch === 'x64') {
|
||
|
paths.unshift('C:/libjpeg-turbo64')
|
||
|
}
|
||
|
|
||
|
paths.forEach(function(path){
|
||
|
if (exists(path)) {
|
||
|
process.stdout.write(path)
|
||
|
process.exit()
|
||
|
}
|
||
|
})
|
||
|
|
||
|
function exists(path) {
|
||
|
try {
|
||
|
return fs.lstatSync(path).isDirectory()
|
||
|
} catch(e) {
|
||
|
return false
|
||
|
}
|
||
|
}
|