Browse Source

Create uppy webdir if it does not exist

Kevin van Zonneveld 9 years ago
parent
commit
13686f6acd
1 changed files with 6 additions and 1 deletions
  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: '),