allows -G as an alternative to -K (temporarily)

This commit is contained in:
Joe Bryan 2018-10-10 11:38:32 -04:00
parent ca1259bf70
commit 4b6c697814
2 changed files with 11 additions and 5 deletions

View File

@ -222,8 +222,8 @@ _main_getopt(c3_i argc, c3_c** argv)
return c3n; return c3n;
} }
if ( u3_Host.ops_u.gen_c != 0 && ( !imp_t || u3_Host.ops_u.nuu == c3n ) ) { if ( u3_Host.ops_u.gen_c != 0 && u3_Host.ops_u.nuu == c3n ) {
fprintf(stderr, "-G only makes sense when creating a new galaxy\n"); fprintf(stderr, "-G only makes sense when bootstrapping a new instance\n");
return c3n; return c3n;
} }

View File

@ -1386,13 +1386,19 @@ u3_sist_boot(void)
u3z(whu); u3z(whu);
} }
else { else {
if ( 0 == u3_Host.ops_u.key_c ) { u3_noun des = u3_none;
if ( 0 != u3_Host.ops_u.key_c ) {
des = u3m_file(u3_Host.ops_u.key_c);
}
else if ( 0 != u3_Host.ops_u.gen_c ) {
des = u3i_string(u3_Host.ops_u.gen_c);
}
else {
// XX print nice error // XX print nice error
u3_lo_bail(); u3_lo_bail();
} }
u3_noun des = u3m_file(u3_Host.ops_u.key_c);
u3A->fak = c3n; u3A->fak = c3n;
pig = _sist_dawn(u3k(des)); pig = _sist_dawn(u3k(des));
who = u3k(u3h(u3h(u3t(pig)))); who = u3k(u3h(u3h(u3t(pig))));