2017-08-21 19:33:53 +02:00
|
|
|
var exec = require('child_process').exec;
|
|
|
|
var path = require('path');
|
|
|
|
|
|
|
|
var themeFolder = path.join(path.resolve('.'), 'themes');
|
|
|
|
var oldTheme = path.join(themeFolder, 'infusion');
|
|
|
|
|
2017-08-22 10:54:01 +02:00
|
|
|
exec('mv '+oldTheme+' '+oldTheme+'-old-'+Date.now(), function(error, stdout, stderr) {
|
2017-09-13 09:37:35 +02:00
|
|
|
console.log('Updating...');
|
2017-08-21 19:33:53 +02:00
|
|
|
if (error !== null) {
|
|
|
|
console.error('Error saving old infusion version.');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
exec ('svn export https://github.com/ThePacielloGroup/infusion/trunk/themes/infusion '+oldTheme, function(error, stdout, stderr) {
|
|
|
|
if (error !== null) {
|
|
|
|
console.error('SVN error exporting infusion from Github. Is SVN installed?');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
console.log('Infusion updated to latest version!');
|
|
|
|
});
|
|
|
|
});
|