Class: YPTools

Inherits:
Object
  • Object
show all
Defined in:
lib/yptools.rb

Class Method Summary collapse

Class Method Details

.cmd_dispatch(argvs) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/yptools.rb', line 14

def self.cmd_dispatch(argvs)
    cmd = argvs[0]
    case cmd
    when 'install'
        if argvs.size > 1
            name = argvs[1]
            self.install name
        else
            yp_log_fail "'yptools install ..' 参数缺失"
            self.help
        end
    when 'help'
        self.help
    when 'ufct'
        self.ufct
    when 'mgc'
        if argvs.size > 1
            suffix = argvs[1]
            self.mgc suffix
        else
            yp_log_fail "'yptools mgc ..' 参数缺失"
            self.help
        end
    when 'install'
        if argvs.size > 1
            name = argvs[1]
            self.install name
        else
            yp_log_fail "'yptools install ..' 参数缺失"
            self.help
        end
    when 'showipa'
        if argvs.size > 2
            filepath = argvs[1]
            self.package(filepath,0)
        elsif argvs.size > 1
            filepath = argvs[1]
            self.package filepath
        else
            yp_log_fail "'yptools package ..' 参数缺失"
            self.help
        end
    when 'update'
        self.update
    when 'xpj'
        if argvs.size > 1
            cmd = argvs[1]
            self.xpj cmd
        else
            yp_log_fail "'yptools xpj ..' 参数缺失"
            self.help
        end
    else
        self.help
    end
    
end

.helpObject



72
73
74
# File 'lib/yptools.rb', line 72

def self.help
    YPHelp.message
end

.install(name) ⇒ Object



86
87
88
# File 'lib/yptools.rb', line 86

def self.install(name)
    YPInstall.install(name)
end

.mgc(suffix) ⇒ Object



82
83
84
# File 'lib/yptools.rb', line 82

def self.mgc(suffix)
    yp_tools_method_makeGarbage suffix
end

.package(filepath, delete = 1) ⇒ Object



90
91
92
# File 'lib/yptools.rb', line 90

def self.package(filepath, delete = 1)
    YPPackage.analysis(filepath,delete)
end

.ufctObject



76
77
78
79
80
# File 'lib/yptools.rb', line 76

def self.ufct
    path = `pwd`
    path = path.sub("\n","")
    yp_updatereateDate path
end

.updateObject



94
95
96
# File 'lib/yptools.rb', line 94

def self.update
    YPUpdate.update
end

.xpj(cmd) ⇒ Object



98
99
100
# File 'lib/yptools.rb', line 98

def self.xpj(cmd)
    YPXcodeproj.xcodeproj(cmd)
end