xbps-bin/install.c: use only a function for install/update/autoupdate.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016153732-gbcr30fahvveu2u9
This commit is contained in:
Juan RP
2009-10-16 17:37:32 +02:00
parent cb1f10d415
commit f7689695d1
3 changed files with 66 additions and 108 deletions

View File

@@ -152,14 +152,14 @@ main(int argc, char **argv)
if (argc != 2)
usage();
xbps_install_pkg(argv[1], force, false);
xbps_exec_transaction(argv[1], force, false);
} else if (strcasecmp(argv[0], "update") == 0) {
/* Update an installed package. */
if (argc != 2)
usage();
xbps_install_pkg(argv[1], force, true);
xbps_exec_transaction(argv[1], force, true);
} else if (strcasecmp(argv[0], "remove") == 0) {
/* Removes a binary package. */
@@ -207,7 +207,7 @@ main(int argc, char **argv)
if (argc != 1)
usage();
xbps_autoupdate_pkgs(force);
xbps_exec_transaction("all", force, true);
} else if (strcasecmp(argv[0], "autoremove") == 0) {
/*