changing pkg() to install()
This commit is contained in:
		@@ -26,8 +26,8 @@ type PacketLua struct {
 | 
				
			|||||||
	GlobalSources      *[]Source
 | 
						GlobalSources      *[]Source
 | 
				
			||||||
	GlobalDependencies *PkgDependencies
 | 
						GlobalDependencies *PkgDependencies
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Build *lua.LFunction
 | 
						Build   *lua.LFunction
 | 
				
			||||||
	Pkg   *lua.LFunction
 | 
						Install *lua.LFunction
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Source struct {
 | 
					type Source struct {
 | 
				
			||||||
@@ -121,12 +121,12 @@ func ReadPacket(f []byte, cfg *Config) (PacketLua, error) {
 | 
				
			|||||||
		GlobalDependencies: getDependenciesFromTable(pkgTable, "build_dependencies"),
 | 
							GlobalDependencies: getDependenciesFromTable(pkgTable, "build_dependencies"),
 | 
				
			||||||
		GlobalSources:      getSourcesFromTable(pkgTable, "sources"),
 | 
							GlobalSources:      getSourcesFromTable(pkgTable, "sources"),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Build: getFunctionFromTable(table, "build"),
 | 
							Build:   getFunctionFromTable(table, "build"),
 | 
				
			||||||
		Pkg:   getFunctionFromTable(table, "pkg"),
 | 
							Install: getFunctionFromTable(table, "install"),
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if packetLua.Pkg == nil {
 | 
						if packetLua.Install == nil {
 | 
				
			||||||
		return PacketLua{}, fmt.Errorf("pkg() does not exist")
 | 
							return PacketLua{}, fmt.Errorf("install() does not exist")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return *packetLua, nil
 | 
						return *packetLua, nil
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,7 +54,7 @@ return {
 | 
				
			|||||||
    build = function() 
 | 
					    build = function() 
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    pkg = function() -- required 
 | 
					    install = function() -- required 
 | 
				
			||||||
    print("oi amores")
 | 
					    print("oi amores")
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,7 +35,7 @@ return {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    pkg  = function() -- required 
 | 
					    install  = function() -- required 
 | 
				
			||||||
    print("goku")
 | 
					    print("goku")
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user