un 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/un.rb +5 -3
- data/un.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8c8d915490e45125d7b38a47b0aeb67b28b9ab530c7fba21839a05f8343e34d
|
4
|
+
data.tar.gz: 7017890ba253218048086124b79a493885bcc6bc6441023faf1a58ec82e32075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f579ec63b6cbc2c69a29df7b4d90c897b44384a807f13714895f7505696dbe742aee8825602010e3a0aefe1a4a53cad5b2480c4e31d43c2081ea6425d1262e3f
|
7
|
+
data.tar.gz: efd61b8e25c638735bd9349eec4098ab0d5aed956b1ec6ca5fa9847a63ac9fc6625f97bc661d1d44b2ab546362c759514caa3dde6ea227cb461ccb284b7d512e
|
data/lib/un.rb
CHANGED
@@ -79,13 +79,15 @@ end
|
|
79
79
|
#
|
80
80
|
# -p preserve file attributes if possible
|
81
81
|
# -r copy recursively
|
82
|
+
# -l make hard link instead of copying (implies -r)
|
82
83
|
# -v verbose
|
83
84
|
#
|
84
85
|
|
85
86
|
def cp
|
86
|
-
setup("
|
87
|
+
setup("prl") do |argv, options|
|
87
88
|
cmd = "cp"
|
88
89
|
cmd += "_r" if options.delete :r
|
90
|
+
cmd = "cp_lr" if options.delete :l
|
89
91
|
options[:preserve] = true if options.delete :p
|
90
92
|
dest = argv.pop
|
91
93
|
argv = argv[0] if argv.size == 1
|
@@ -254,7 +256,7 @@ def wait_writable
|
|
254
256
|
wait = (wait = options[:w]) ? Float(wait) : 0.2
|
255
257
|
argv.each do |file|
|
256
258
|
begin
|
257
|
-
open(file, "r+b")
|
259
|
+
File.open(file, "r+b") {}
|
258
260
|
rescue Errno::ENOENT
|
259
261
|
break
|
260
262
|
rescue Errno::EACCES => e
|
@@ -420,7 +422,7 @@ module UN # :nodoc:
|
|
420
422
|
messages = {}
|
421
423
|
store = proc {|msg| messages[cmd] = msg}
|
422
424
|
end
|
423
|
-
open(__FILE__) do |me|
|
425
|
+
File.open(__FILE__) do |me|
|
424
426
|
while me.gets("##\n")
|
425
427
|
if help = me.gets("\n\n")
|
426
428
|
if all or argv.include?(cmd = help[/^#\s*ruby\s.*-e\s+(\w+)/, 1])
|
data/un.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WATANABE Hirofumi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Utilities to replace common UNIX commands
|
14
14
|
email:
|
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
requirements: []
|
51
|
-
rubygems_version: 3.
|
51
|
+
rubygems_version: 3.4.0.dev
|
52
52
|
signing_key:
|
53
53
|
specification_version: 4
|
54
54
|
summary: Utilities to replace common UNIX commands
|