mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 12:43:31 +03:00
Merge branch 'master' of github.com:urbit/urbit
This commit is contained in:
commit
4144b7dea7
26
Makefile
26
Makefile
@ -354,7 +354,7 @@ LIBCOMMONMARK=outside/commonmark/build/src/libcmark.a
|
||||
|
||||
LIBSCRYPT=outside/scrypt/scrypt.a
|
||||
|
||||
all: vere
|
||||
all: urbit
|
||||
|
||||
.MAKEFILE-VERSION: Makefile .make.conf
|
||||
@echo "Makefile update."
|
||||
@ -363,7 +363,7 @@ all: vere
|
||||
.make.conf:
|
||||
@echo "# Set custom configuration here, please!" > ".make.conf"
|
||||
|
||||
vere: $(BIN)/vere
|
||||
urbit: $(BIN)/urbit
|
||||
meme: $(BIN)/meme
|
||||
|
||||
$(LIBUV_MAKEFILE) $(LIBUV_MAKEFILE2):
|
||||
@ -393,14 +393,14 @@ $(CRE2_OFILES): outside/cre2/src/src/cre2.cpp outside/cre2/src/src/cre2.h $(LIBR
|
||||
$(V_OFILES): i/v/vere.h
|
||||
|
||||
ifdef NO_SILENT_RULES
|
||||
$(BIN)/vere: $(LIBCRE) $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT)
|
||||
$(BIN)/urbit: $(LIBCRE) $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT)
|
||||
mkdir -p $(BIN)
|
||||
$(CLD) $(CLDOSFLAGS) -o $(BIN)/vere $(VERE_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT)
|
||||
$(CLD) $(CLDOSFLAGS) -o $(BIN)/urbit $(VERE_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT)
|
||||
else
|
||||
$(BIN)/vere: $(LIBCRE) $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT)
|
||||
@echo " CCLD $(BIN)/vere"
|
||||
$(BIN)/urbit: $(LIBCRE) $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT)
|
||||
@echo " CCLD $(BIN)/urbit"
|
||||
@mkdir -p $(BIN)
|
||||
@$(CLD) $(CLDOSFLAGS) -o $(BIN)/vere $(VERE_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT)
|
||||
@$(CLD) $(CLDOSFLAGS) -o $(BIN)/urbit $(VERE_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT)
|
||||
endif
|
||||
|
||||
$(BIN)/meme: $(LIBCRE) $(LIBCOMMONMARK) $(MEME_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT)
|
||||
@ -416,24 +416,24 @@ etags:
|
||||
osxpackage:
|
||||
$(RM) -r inst
|
||||
$(MAKE) distclean
|
||||
$(MAKE) $(BIN)/vere LIB=/usr/local/lib/urb STATIC=yes
|
||||
$(MAKE) $(BIN)/urbit LIB=/usr/local/lib/urb STATIC=yes
|
||||
mkdir -p inst/usr/local/lib/urb inst/usr/local/bin
|
||||
cp $(BIN)/vere inst/usr/local/bin
|
||||
cp $(BIN)/urbit inst/usr/local/bin
|
||||
cp urb/urbit.pill inst/usr/local/lib/urb
|
||||
cp -R urb/zod inst/usr/local/lib/urb
|
||||
pkgbuild --root inst --identifier org.urbit.vere --version 0.2 vere.pkg
|
||||
pkgbuild --root inst --identifier org.urbit.urbit --version 0.2 urbit.pkg
|
||||
|
||||
debbuild:
|
||||
$(MAKE) $(BIN)/vere LIB=/usr/share/urb
|
||||
$(MAKE) $(BIN)/urbit LIB=/usr/share/urb
|
||||
|
||||
debinstall:
|
||||
mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/urb
|
||||
install -m755 $(BIN)/vere $(DESTDIR)/usr/bin
|
||||
install -m755 $(BIN)/urbit $(DESTDIR)/usr/bin
|
||||
cp urb/urbit.pill $(DESTDIR)/usr/share/urb
|
||||
cp -R urb/zod $(DESTDIR)/usr/share/urb
|
||||
|
||||
clean:
|
||||
$(RM) $(VERE_OFILES) $(BIN)/vere vere.pkg $(VERE_DFILES)
|
||||
$(RM) $(VERE_OFILES) $(BIN)/urbit urbit.pkg $(VERE_DFILES)
|
||||
|
||||
distclean: clean $(LIBUV_MAKEFILE)
|
||||
$(MAKE) -C outside/libuv_0.11 distclean
|
||||
|
@ -521,6 +521,8 @@
|
||||
c3_c* imp_c; // -I, czar name
|
||||
c3_c* nam_c; // -n, unix hostname
|
||||
c3_c* raf_c; // -r, raft flotilla
|
||||
c3_c* who_c; // -T, begin with ticket
|
||||
c3_c* tic_c; // -T, ticket value
|
||||
c3_w kno_w; // -k, kernel version
|
||||
c3_w fuz_w; // -f, fuzz testing
|
||||
c3_s por_s; // -p, ames port
|
||||
@ -536,7 +538,7 @@
|
||||
c3_o pro; // -P, profile
|
||||
c3_o veb; // -v, verbose (inverse of -q)
|
||||
c3_o nuu; // -c, new pier
|
||||
c3_o vno; // -V
|
||||
c3_o vno; // -V, turn on +verb
|
||||
c3_o mem; // -M, memory madness
|
||||
} u3_opts;
|
||||
|
||||
@ -791,6 +793,11 @@
|
||||
void
|
||||
u3_term_ef_boil();
|
||||
|
||||
/* u3_term_ef_ticket(): initial effects for new ticket.
|
||||
*/
|
||||
void
|
||||
u3_term_ef_ticket(c3_c* who_c, c3_c* tic_c);
|
||||
|
||||
/* u3_term_ef_winc(): window change.
|
||||
*/
|
||||
void
|
||||
|
3
v/loop.c
3
v/loop.c
@ -691,6 +691,9 @@ u3_lo_lead(void)
|
||||
#endif
|
||||
|
||||
if ( c3y == u3_Host.ops_u.nuu ) {
|
||||
if ( u3_Host.ops_u.who_c ) {
|
||||
u3_term_ef_ticket(u3_Host.ops_u.who_c, u3_Host.ops_u.tic_c);
|
||||
}
|
||||
u3_term_ef_boil(1);
|
||||
}
|
||||
|
||||
|
24
v/main.c
24
v/main.c
@ -40,6 +40,22 @@ _main_readw(const c3_c* str_c, c3_w max_w, c3_w* out_w)
|
||||
|
||||
static c3_c hostbuf[2048]; // kill me
|
||||
|
||||
/* _main_presig(): prefix optional sig.
|
||||
*/
|
||||
c3_c*
|
||||
_main_presig(c3_c* txt_c)
|
||||
{
|
||||
c3_c* new_c = malloc(2 + strlen(txt_c));
|
||||
|
||||
if ( '~' == *txt_c ) {
|
||||
strcpy(new_c, txt_c);
|
||||
} else {
|
||||
new_c[0] = '~';
|
||||
strcpy(new_c + 1, txt_c);
|
||||
}
|
||||
return new_c;
|
||||
}
|
||||
|
||||
/* _main_getopt(): extract option map from command line.
|
||||
*/
|
||||
static u3_noun
|
||||
@ -62,7 +78,7 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
u3_Host.ops_u.mem = c3n;
|
||||
u3_Host.ops_u.kno_w = DefaultKernel;
|
||||
|
||||
while ( (ch_i = getopt(argc, argv, "I:X:f:k:l:n:p:r:LabcdgqvFMPD")) != -1 ) {
|
||||
while ( (ch_i = getopt(argc, argv, "I:T:X:f:k:l:n:p:r:LabcdgqvFMPD")) != -1 ) {
|
||||
switch ( ch_i ) {
|
||||
case 'M': {
|
||||
u3_Host.ops_u.mem = c3y;
|
||||
@ -72,6 +88,11 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
u3_Host.ops_u.imp_c = strdup(optarg);
|
||||
break;
|
||||
}
|
||||
case 'T': {
|
||||
u3_Host.ops_u.who_c = _main_presig(optarg);
|
||||
u3_Host.ops_u.tic_c = _main_presig(getpass("your ticket: ~"));
|
||||
break;
|
||||
}
|
||||
case 'X': {
|
||||
if ( 0 != strcmp("wtf", optarg) ) {
|
||||
return c3n;
|
||||
@ -363,6 +384,7 @@ main(c3_i argc,
|
||||
}
|
||||
|
||||
// u3e_grab("main", u3_none);
|
||||
//
|
||||
u3_lo_loop();
|
||||
|
||||
return 0;
|
||||
|
26
v/term.c
26
v/term.c
@ -1012,6 +1012,32 @@ u3_term_ef_boil(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* u3_term_ef_ticket(): initial effects for new ticket.
|
||||
*/
|
||||
void
|
||||
u3_term_ef_ticket(c3_c* who_c, c3_c* tic_c)
|
||||
{
|
||||
u3_noun pax = u3nq(u3_blip, c3__term, '1', u3_nul);
|
||||
u3_noun who, tic;
|
||||
u3_noun whu, tuc;
|
||||
|
||||
whu = u3dc("slaw", 'p', u3i_string(who_c));
|
||||
if ( u3_nul == whu ) {
|
||||
fprintf(stderr, "ticket: invalid planet '%s'\r\n", who_c);
|
||||
exit(1);
|
||||
}
|
||||
else { who = u3k(u3t(whu)); u3z(whu); }
|
||||
|
||||
tuc = u3dc("slaw", 'p', u3i_string(tic_c));
|
||||
if ( u3_nul == tuc ) {
|
||||
fprintf(stderr, "ticket: invalid secret '%s'\r\n", tic_c);
|
||||
exit(1);
|
||||
}
|
||||
else { tic = u3k(u3t(tuc)); u3z(tuc); }
|
||||
|
||||
u3v_plan(pax, u3nt(c3__tick, who, tic));
|
||||
}
|
||||
|
||||
/* u3_term_ef_bake(): initial effects for new terminal.
|
||||
*/
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user