X-Git-Url: http://nitlanguage.org diff --git a/src/nitpm.nit b/src/nitpm.nit index c2dbe2d..0c6ed5f 100644 --- a/src/nitpm.nit +++ b/src/nitpm.nit @@ -78,7 +78,7 @@ class CommandInstall exit 1 end - var ini = new ConfigTree(ini_path) + var ini = new IniFile.from_file(ini_path) var import_line = ini["package.import"] if import_line == null then print_error "The local `package.ini` declares no external dependencies." @@ -104,11 +104,10 @@ class CommandInstall do if package_id.is_package_name then # Ask a centralized server - # TODO choose a future safe URL # TODO customizable server list # TODO parse ini file in memory - var url = "https://xymus.net/nitpm/{package_id}.ini" + var url = "https://nitlanguage.org/catalog/p/{package_id}.ini" var ini_path = "/tmp/{package_id}.ini" if verbose then print "Looking for a package description at '{url}'" @@ -136,7 +135,7 @@ class CommandInstall print ini_path.to_path.read_all end - var ini = new ConfigTree(ini_path) + var ini = new IniFile.from_file(ini_path) var git_repo = ini["upstream.git"] if git_repo == null then print_error "Package description invalid, or it does not declare a Git repository" @@ -196,7 +195,7 @@ class CommandInstall end # Recursive install - var ini = new ConfigTree(target_dir/"package.ini") + var ini = new IniFile.from_file(target_dir/"package.ini") var import_line = ini["package.import"] if import_line != null then install_packages import_line @@ -321,7 +320,7 @@ class CommandList for file in files do var ini_path = nitpm_lib_dir / file / "package.ini" if verbose then print "- Reading ini file at {ini_path}" - var ini = new ConfigTree(ini_path) + var ini = new IniFile.from_file(ini_path) var tags = ini["package.tags"] name_to_desc[file] = tags @@ -371,10 +370,10 @@ redef class Sys var opts = new OptionContext # Help option - var opt_help = new OptionBool("Show this help message", "--help", "-h") + var opt_help = new OptionBool("Show help message", "-h", "--help") # Verbose mode option - var opt_verbose = new OptionBool("Print more information", "--verbose", "-v") + var opt_verbose = new OptionBool("Print more information", "-v", "--verbose") private fun verbose: Bool do return opt_verbose.value # All command line actions, mapped to their short `name`