sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 5cf965ffbf043e2132ec1788bf7fd3c165a937f0
parent 9750071b9781face6140e5a2932ae5b81dec6324
Author: Evan Gates <evan.gates@gmail.com>
Date:   Fri,  7 Nov 2014 14:12:13 -0800

return exit status of command in sbase-box

Diffstat:
MMakefile | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -171,7 +171,7 @@ sbase-box: $(SRC) util.a @echo '#include "util.h"' >> build/$@.c @for f in $(SRC); do echo "int `basename $$f .c`_main(int, char **);" >> build/$@.c; done @echo 'int main(int argc, char *argv[]) { char *s = basename(argv[0]); if(!strcmp(s,"sbase-box")) { argc--; argv++; s = basename(argv[0]); } if(0) ;' >> build/$@.c - @for f in $(SRC); do echo "else if(!strcmp(s, \"`basename $$f .c`\")) `basename $$f .c`_main(argc, argv);" >> build/$@.c; done + @for f in $(SRC); do echo "else if(!strcmp(s, \"`basename $$f .c`\")) return `basename $$f .c`_main(argc, argv);" >> build/$@.c; done @echo 'else {' >> build/$@.c @for f in $(SRC); do echo "printf(\"`basename $$f .c`\"); putchar(' ');" >> build/$@.c; done @echo "putchar(0xa); }; return 0; }" >> build/$@.c