check for files before download
This commit is contained in:
parent
23b223ea26
commit
149eac3df8
10 changed files with 114 additions and 35 deletions
|
|
@ -12,6 +12,15 @@ var crowdin_identifier = 'copay'
|
|||
var local_file_name2 = path.join(__dirname, 'docs/appstore_en.txt')
|
||||
var local_file_name3 = path.join(__dirname, 'docs/updateinfo_en.txt')
|
||||
|
||||
try {
|
||||
fs.statSync(local_file_name2);
|
||||
fs.statSync(local_file_name3);
|
||||
}
|
||||
catch (e) {
|
||||
console.log('\n### ABORTING ### One of the following files does not exist:\n' + local_file_name2 + '\n' + local_file_name3);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Download most recent translations for all languages.
|
||||
https.get('https://crowdin.com/download/project/' + crowdin_identifier + '.zip', function(res) {
|
||||
var data = [], dataLen = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue