summaryrefslogtreecommitdiff
path: root/rpm.c
diff options
context:
space:
mode:
authorroot <devnull@localhost>1996-07-01 21:36:36 +0000
committerroot <devnull@localhost>1996-07-01 21:36:36 +0000
commit3fc67229c0e4b7613e15b743cae0eef1f3e9f5ae (patch)
tree9afc61b2d3d31cbd278e969dff9b3b18b3840a15 /rpm.c
parentd1f1f7375a2077493b5b4013c4fffb4fa78f9fa7 (diff)
downloadrpm-3fc67229c0e4b7613e15b743cae0eef1f3e9f5ae.tar.gz
rpm-3fc67229c0e4b7613e15b743cae0eef1f3e9f5ae.tar.bz2
rpm-3fc67229c0e4b7613e15b743cae0eef1f3e9f5ae.zip
added stuff to handle --arch and --os and
wacky new arch handling stuff CVS patchset: 707 CVS date: 1996/07/01 21:36:36
Diffstat (limited to 'rpm.c')
-rwxr-xr-xrpm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/rpm.c b/rpm.c
index d87098050..437b67ade 100755
--- a/rpm.c
+++ b/rpm.c
@@ -236,11 +236,14 @@ int main(int argc, char ** argv) {
char * prefix = "/";
char * specFile;
char *passPhrase = "";
+ char *arch = NULL;
+ char *os = NULL;
char * smallArgv[2] = { NULL, NULL };
char ** currarg;
int ec = 0;
struct option optionsTable[] = {
{ "all", 0, 0, 'a' },
+ { "arch", 1, 0, 0 },
{ "build", 1, 0, 'b' },
{ "checksig", 0, 0, 'K' },
{ "clean", 0, &clean, 0 },
@@ -263,6 +266,7 @@ int main(int argc, char ** argv) {
{ "nopgp", 0, &noPgp, 0 },
{ "noscripts", 0, &noScripts, 0 },
{ "oldpackage", 0, &oldPackage, 0 },
+ { "os", 1, 0, 0 },
{ "package", 0, 0, 'p' },
{ "percent", 0, &showPercents, 0 },
{ "provides", 0, 0, 0 },
@@ -305,19 +309,23 @@ int main(int argc, char ** argv) {
bindtextdomain(NLSPACKAGE, "/usr/lib/locale");
textdomain(NLSPACKAGE);
- /* make a first pass through the arguments, looking for --rcfile. We
- need to handle that before dealing with the rest of the arguments */
+ /* Make a first pass through the arguments, looking for --rcfile */
+ /* as well as --arch and --os. We need to handle that before */
+ /* dealing with the rest of the arguments. */
currarg = argv;
while (*currarg) {
if (!strcmp(*currarg, "--rcfile")) {
rcfile = *(currarg + 1);
- break;
+ } else if (!strcmp(*currarg, "--arch")) {
+ arch = *(currarg + 1);
+ } else if (!strcmp(*currarg, "--os")) {
+ os = *(currarg + 1);
}
currarg++;
}
/* reading this early makes it easy to override */
- if (readConfigFiles(rcfile))
+ if (readConfigFiles(rcfile, arch, os))
exit(1);
while (1) {