Top Level Namespace
Defined Under Namespace
Modules: Git, QCloudHive
Classes: Pathname
Constant Summary
collapse
- L =
Logger.new(STDOUT)
Instance Method Summary
collapse
Instance Method Details
#DZCopyFile(originPath, aimPath, dir) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/qcloudhive/utils.rb', line 7
def DZCopyFile(originPath , aimPath , dir)
fileOriginPath = originPath
argv = " "
if File.exist?(aimPath)
puts aimPath + " already exsit! Will update"
if dir
argv = " -r -f -p "
else
argv = " -f -p "
end
else
if dir
argv = " -r -p"
end
end
Rake::sh "cp "+ argv + " " + fileOriginPath + " " + aimPath
end
|
#Error(msg) ⇒ Object
36
37
38
39
|
# File 'lib/qcloudhive/utils.rb', line 36
def Error(msg)
puts msg
exit(1)
end
|
#GetOptValue(cmd, opts, name) ⇒ Object
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/qcloudhive/utils.rb', line 25
def GetOptValue(cmd, opts, name)
value = opts[name]
L.debug "name is #{name} value is #{value}"
if value == nil
puts "您没有输入必须输入的参数#{name}"
puts cmd.help
exit(1)
end
return value
end
|
#VersionStrToNumber(str) ⇒ Object
41
42
43
44
45
46
|
# File 'lib/qcloudhive/utils.rb', line 41
def VersionStrToNumber(str)
if str == None
return 0
end
end
|