update.js 724 B

1234567891011121314151617181920
  1. var exec = require('child_process').exec;
  2. var path = require('path');
  3. var themeFolder = path.join(path.resolve('.'), 'themes');
  4. var oldTheme = path.join(themeFolder, 'infusion');
  5. exec('mv '+oldTheme+' '+oldTheme+'-old-'+Date.now(), function(error, stdout, stderr) {
  6. console.log('Updating...');
  7. if (error !== null) {
  8. console.error('Error saving old infusion version.');
  9. return;
  10. }
  11. exec ('svn export https://github.com/ThePacielloGroup/infusion/trunk/themes/infusion '+oldTheme, function(error, stdout, stderr) {
  12. if (error !== null) {
  13. console.error('SVN error exporting infusion from Github. Is SVN installed?');
  14. return;
  15. }
  16. console.log('Infusion updated to latest version!');
  17. });
  18. });