Skip to content

Commit

Permalink
Added load script for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Dec 6, 2018
1 parent 148eecb commit 9c6a13c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/folder/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ if (require.main === module) {
if (err) throw err;

access("dev", function() {
console.log(DROPBOX_FOLDER_PATH);

if (identifier === 'debug') {
console.log('Folder: ', join(helper.rootDir, "data", "debug"));
} else {
console.log('Folder: ', DROPBOX_FOLDER_PATH);
}

process.exit();
});
});
Expand All @@ -35,6 +41,11 @@ function main(label, callback) {
fs.ensureDirSync(join(dumps, label));
fs.copySync(join(dumps, label), blog_dir);

if (label === 'debug') {
fs.emptyDirSync(join(helper.rootDir, "data", "debug"));
fs.copySync(join(blog_dir, BLOG_ID), join(helper.rootDir, "data", "debug"));
}

fs.emptyDirSync(git_data_dir);
fs.ensureDirSync(join(gitClientData, label));
fs.copySync(join(gitClientData, label), git_data_dir);
Expand Down

0 comments on commit 9c6a13c

Please sign in to comment.