Skip to content

Commit

Permalink
[verbose-shell] Add chmod()
Browse files Browse the repository at this point in the history
  • Loading branch information
caldwell committed Aug 15, 2016
1 parent fb41ae4 commit af551e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions verbose-shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ def self.mv(src,dest,options={})
FileUtils.mv(src, dest, options)
end

def self.chmod(mode,list,options={})
list = [list] unless list.class == Array
system_trace *%W"chmod #{mode} "+list
FileUtils.chmod(mode, list, options)
end

def self.cp(src,dest,options={})
system_trace *%W"cp #{src} #{dest}"
FileUtils.cp(src, dest, options)
Expand Down

0 comments on commit af551e9

Please sign in to comment.