Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var promise = require('bluebird');
  2.  
  3.  
  4. function download(url) {
  5.     return Promise.resolve()
  6. }
  7.  
  8. function untar(tarfile) {
  9.     return Promise.resolve()
  10. }
  11.  
  12. function install(files) {
  13.     return Promise.resolve(files)
  14. }
  15.  
  16. function update() {
  17.     return Promise.resolve(files)
  18. }
  19.  
  20. function getTar(url) {
  21.     if (needDownload) {
  22.         return download(url);
  23.     }
  24.     return Promise.resolve(url);
  25. }
  26.  
  27. function onError(err) {
  28.     console.log("Error");
  29. }
  30.  
  31. getTar(url).then(untar).then(install).then(update, onError);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement