install multiple packages at once with the install command
This commit is contained in:
@@ -12,19 +12,7 @@ from util import check_ground_libs_path, check_sudo
|
||||
console = Console()
|
||||
|
||||
|
||||
def install(args):
|
||||
|
||||
check_sudo()
|
||||
check_ground_libs_path()
|
||||
|
||||
# figure out which version to install
|
||||
package_name = args.name
|
||||
version = "latest"
|
||||
if "@" in args.name:
|
||||
split = package_name.split("@")
|
||||
package_name = split[0]
|
||||
version = split[1]
|
||||
|
||||
def install_package(package_name, version, args):
|
||||
retries_left = args.max_retries
|
||||
|
||||
with console.status("Downloading tarball...", spinner="bouncingBall", spinner_style="blue") as status:
|
||||
@@ -82,4 +70,20 @@ def install(args):
|
||||
if not os.path.isfile(symlink_path):
|
||||
os.symlink(os.path.join(extract_dir, package_name, "main.so"), symlink_path)
|
||||
|
||||
console.print("[:white_check_mark:] Done!")
|
||||
console.print("[:white_check_mark:] Done!")
|
||||
|
||||
def install(args):
|
||||
|
||||
check_sudo()
|
||||
check_ground_libs_path()
|
||||
|
||||
for package in args.names:
|
||||
# figure out which version to install
|
||||
package_name = package
|
||||
version = "latest"
|
||||
if "@" in package:
|
||||
split = package.split("@")
|
||||
package_name = split[0]
|
||||
version = split[1]
|
||||
|
||||
install_package(package_name, version, args)
|
||||
Reference in New Issue
Block a user