* lib/un.rb: add each descriptions for the -v option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2003-08-02 04:21:10 +00:00
parent a138367a97
commit 9b5701bc6f

View File

@ -57,6 +57,7 @@ end
# #
# -p preserve file attributes if possible # -p preserve file attributes if possible
# -r copy recursively # -r copy recursively
# -v verbose
# #
def cp def cp
setup("pr") do |argv, options, opt| setup("pr") do |argv, options, opt|
@ -75,6 +76,7 @@ end
# #
# -s make symbolic links instead of hard links # -s make symbolic links instead of hard links
# -f remove existing destination files # -f remove existing destination files
# -v verbose
# #
def ln def ln
setup("sf") do |argv, options, opt| setup("sf") do |argv, options, opt|
@ -91,6 +93,8 @@ end
# #
# ruby -run -e mv SOURCE DEST # ruby -run -e mv SOURCE DEST
# #
# -v verbose
#
def mv def mv
setup do |argv, options| setup do |argv, options|
dest = argv.pop dest = argv.pop
@ -106,6 +110,7 @@ end
# #
# -f ignore nonexistent files # -f ignore nonexistent files
# -r remove the contents of directories recursively # -r remove the contents of directories recursively
# -v verbose
# #
def rm def rm
setup("fr") do |argv, options, opt| setup("fr") do |argv, options, opt|
@ -121,6 +126,7 @@ end
# ruby -run -e mkdir -- [OPTION] DIR # ruby -run -e mkdir -- [OPTION] DIR
# #
# -p no error if existing, make parent directories as needed # -p no error if existing, make parent directories as needed
# -v verbose
# #
def mkdir def mkdir
setup("p") do |argv, options, opt| setup("p") do |argv, options, opt|
@ -135,6 +141,8 @@ end
# #
# ruby -run -e rmdir DIR # ruby -run -e rmdir DIR
# #
# -v verbose
#
def rmdir def rmdir
setup do |argv, options| setup do |argv, options|
FileUtils.rmdir argv, options FileUtils.rmdir argv, options
@ -149,6 +157,7 @@ end
# -p apply access/modification times of SOURCE files to # -p apply access/modification times of SOURCE files to
# corresponding destination files # corresponding destination files
# -m set permission mode (as in chmod), instead of 0755 # -m set permission mode (as in chmod), instead of 0755
# -v verbose
# #
def install def install
setup("pm:") do |argv, options, opt| setup("pm:") do |argv, options, opt|
@ -164,6 +173,8 @@ end
# #
# ruby -run -e chmod OCTAL-MODE FILE # ruby -run -e chmod OCTAL-MODE FILE
# #
# -v verbose
#
def chmod def chmod
setup do |argv, options| setup do |argv, options|
mode = argv.shift.oct mode = argv.shift.oct
@ -176,6 +187,8 @@ end
# #
# ruby -run -e touch FILE # ruby -run -e touch FILE
# #
# -v verbose
#
def touch def touch
setup do |argv, options| setup do |argv, options|
FileUtils.touch argv, options FileUtils.touch argv, options