Skip to content

Instantly share code, notes, and snippets.

Created January 27, 2016 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9076a82005cad4ff9b57 to your computer and use it in GitHub Desktop.
Save anonymous/9076a82005cad4ff9b57 to your computer and use it in GitHub Desktop.
changes[:mode]['0660'] << file if stat.ftype == 'file' and stat.mode != sprintf('%d', '100660')
changes[:mode].each_pair do |mode,files|
FileUtils.chmod(mode, files, {:verbose => true}) unless files.empty?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment