Last active
October 11, 2015 16:31
-
-
Save marekkalnik/a43df110e74d5a81cf85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var fs = require('fs'); | |
var configFile = './platforms/ios/cordova/build.xcconfig'; | |
var disableBitcode = function() { | |
fs.appendFile(configFile, "\n" + 'ENABLE_BITCODE = NO', function(err) { | |
if (err) { | |
console.log(err); | |
return process.exit(1); | |
} | |
console.log('Bitcode disabled'); | |
process.exit(0); | |
}); | |
}; | |
fs.readFile(configFile, 'utf8', function(err, data) { | |
if (/ENABLE_BITCODE = NO/.test(data)) { | |
console.log('Bitcode already disabled'); | |
return process.exit(0); | |
} | |
return disableBitcode(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment