浏览代码

Create uppy webdir if it does not exist

Kevin van Zonneveld 9 年之前
父节点
当前提交
13686f6acd
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      website/update.js

+ 6 - 1
website/update.js

@@ -52,7 +52,12 @@ var saveConfig = Object.assign({}, defaultConfig, loadedConfig, scanConfig)
 fs.writeFileSync(configPath, YAML.safeDump(saveConfig), 'utf-8')
 console.info(chalk.green('✓ rewritten: '), chalk.dim(configPath))
 
-exec('cp -vfR ' + uppyRoot + '/dist/* ' + webRoot + '/themes/uppy/source/uppy', function (error, stdout, stderr) {
+var cmds = [
+  'mkdir -p ' + webRoot + '/themes/uppy/source/uppy',
+  'cp -vfR ' + uppyRoot + '/dist/* ' + webRoot + '/themes/uppy/source/uppy/'
+].join(' && ')
+
+exec(cmds, function (error, stdout, stderr) {
   if (error) {
     console.error(
       chalk.red('x failed to inject: '),