ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 6e3c035db8d35e9c5bc916af6d303775d2780830
parent 8ddf33f49209305acba7e74b7872f91185400d45
Author: sin <sin@2f30.org>
Date:   Mon, 10 Nov 2014 23:36:44 +0000

Properly signal failure if command fails in ubase-box

Similar fix as the one provided by emg for sbase.

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

diff --git a/Makefile b/Makefile @@ -210,7 +210,7 @@ ubase-box: config.h $(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,"ubase-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