scope issue
This commit is contained in:
		
							parent
							
								
									3a6e75776d
								
							
						
					
					
						commit
						e026e44e52
					
				
					 2 changed files with 10 additions and 4 deletions
				
			
		|  | @ -11,16 +11,19 @@ if not fs.exists(temp) then | ||||||
|     fs.makeDir(temp) |     fs.makeDir(temp) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
|  | local programToInstall = nil | ||||||
| if #args > 0 then | if #args > 0 then | ||||||
|     local programToInstall = args[1] |     programToInstall = args[1] | ||||||
| else | else | ||||||
|     print("usage:") |     print("usage:") | ||||||
|     print("install.lua <project>") |     print("install.lua <project>") | ||||||
|     print("install.lua <project> <custom install path>") |     print("install.lua <project> <custom install path>") | ||||||
| end | end | ||||||
|  | 
 | ||||||
|  | local customPath = nil | ||||||
| if #args > 1 then | if #args > 1 then | ||||||
|     print("WARNING: custom paths are currently not supported.") |     print("WARNING: custom paths are currently not supported.") | ||||||
|     local customPath = shell.resolve(args[2]) |     customPath = shell.resolve(args[2]) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| local function downloadFile(program, filename) | local function downloadFile(program, filename) | ||||||
|  |  | ||||||
|  | @ -11,12 +11,15 @@ if not fs.exists(temp) then | ||||||
|     fs.makeDir(temp) |     fs.makeDir(temp) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
|  | local programToInstall = nil | ||||||
| if #args > 0 then | if #args > 0 then | ||||||
|     local programToInstall = args[1] |     programToInstall = args[1] | ||||||
| end | end | ||||||
|  | 
 | ||||||
|  | local customPath = nil | ||||||
| if #args > 1 then | if #args > 1 then | ||||||
|     print("WARNING: custom paths are currently not supported.") |     print("WARNING: custom paths are currently not supported.") | ||||||
|     local customPath = shell.resolve(args[2]) |     customPath = shell.resolve(args[2]) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| local function downloadFile(program, filename) | local function downloadFile(program, filename) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue