From 79bc23f83a9e3a5e1ca95a60c151cb53bdd098a8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 29 May 2013 22:33:52 -0700 Subject: [PATCH] Copy source mode to destination --- Gruntfile.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 715517cfd..397c12fe8 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -16,6 +16,8 @@ module.exports = (grunt) -> grunt.file.recurse source, (sourcePath, rootDirectory, subDirectory='', filename) -> destinationPath = path.join(destination, subDirectory, filename) grunt.file.copy(sourcePath, destinationPath) + if grunt.file.exists(destinationPath) + fs.chmodSync(destinationPath, fs.statSync(sourcePath).mode) else grunt.file.copy(source, destination) grunt.log.writeln("Copied #{source.cyan} to #{destination.cyan}.")