Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var promise = require('bluebird');
- function download(url) {
- return Promise.resolve()
- }
- function untar(tarfile) {
- return Promise.resolve()
- }
- function install(files) {
- return Promise.resolve(files)
- }
- function update() {
- return Promise.resolve(files)
- }
- function getTar(url) {
- if (needDownload) {
- return download(url);
- }
- return Promise.resolve(url);
- }
- function onError(err) {
- console.log("Error");
- }
- getTar(url).then(untar).then(install).then(update, onError);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement