Sha256: 31ddfac384caae5a36bb9f6fa24d4f780a5f423ec4150b0056b93838ada730bb

Contents?: true

Size: 315 Bytes

Versions: 2

Compression:

Stored size: 315 Bytes

Contents

namespace :st do
  desc 'fix files(644) and directories(755) permission recursively.'
  task :chmod do
    require 'pathname'
    Pathname.glob("**/*").each{ |path|
      next unless path.writable?

      if path.directory?
        path.chmod(0755)

      else
        path.chmod(0644)

      end
    }

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
source-tools-0.6.1 lib/source-tools/tasks/chmod.rb
source-tools-0.6.0 lib/source-tools/tasks/chmod.rb