require_once("config.inc"); require_once("util.inc"); require_once("pkg-utils.inc"); global $g, $config, $argv, $command_split; if (is_array($command_split)) { $args = array_slice($command_split, 1); } else { $args = array_slice($argv, 2); } $pkg_name = $args[0]; echo "Installing package \"{$pkg_name}\"...\n"; echo "Trying to fetch package info..."; $pkg_info = get_pkg_info(); if ($pkg_info) { echo " Done.\n"; } else { echo "\n" . gettext(' >>> Unable to get pkg info.') . "\n"; return; } $static_output = ""; $pkg_interface = "console"; if (empty($pkg_info[$pkg_name])) { echo "\nPackage not found.\n"; return; } install_package($pkg_name); echo "\nDone.\n";