From faef2d81c224b715c5e429d04c59ba50fb772d9e Mon Sep 17 00:00:00 2001 From: thing1 Date: Tue, 15 Oct 2024 10:19:30 +0100 Subject: added a stupid amount of work to zpy, and started the document work in latex rather than groff --- comp/lucas-standen-NEA/code2/Makefile | 1 + comp/lucas-standen-NEA/code2/autodoc/Makefile | 11 --- comp/lucas-standen-NEA/code2/autodoc/autodoc | Bin 19584 -> 0 bytes comp/lucas-standen-NEA/code2/autodoc/autodoc.c | 73 ------------------- comp/lucas-standen-NEA/code2/comp.c | 22 +++--- comp/lucas-standen-NEA/code2/examples/Makefile | 5 +- comp/lucas-standen-NEA/code2/examples/dvd.png | Bin 1247 -> 0 bytes comp/lucas-standen-NEA/code2/examples/fib_example | Bin 0 -> 25496 bytes .../code2/examples/helloworld/main | Bin 0 -> 24720 bytes .../code2/examples/helloworld/main.zpy | 3 + .../code2/examples/helloworld/zpybuild.sh | 2 + .../code2/examples/helloworldadv/helloworld.c | 4 ++ .../code2/examples/helloworldadv/helloworld.zpy | 3 + .../code2/examples/helloworldadv/main | Bin 0 -> 19440 bytes .../code2/examples/helloworldadv/main.c | 4 ++ .../code2/examples/helloworldadv/main.zpy | 3 + .../code2/examples/helloworldadv/zpybuild.sh | 4 ++ .../code2/examples/raylib_example.zpy | 36 ---------- .../code2/examples/raylib_example/dvd.png | Bin 0 -> 1247 bytes .../code2/examples/raylib_example/main | Bin 0 -> 1077360 bytes .../code2/examples/raylib_example/main.zpy | 37 ++++++++++ .../code2/examples/raylib_example/zpybuild.sh | 4 ++ .../lucas-standen-NEA/code2/examples/spaceinvaders | Bin 0 -> 1086520 bytes .../code2/examples/spaceinvaders.zpy | 2 + comp/lucas-standen-NEA/code2/examples/str_example | Bin 0 -> 25952 bytes .../lucas-standen-NEA/code2/examples/syntaxerr.zpy | 4 +- comp/lucas-standen-NEA/code2/examples/tmp.zpy.c | 2 + comp/lucas-standen-NEA/code2/parser.c | 2 +- comp/lucas-standen-NEA/code2/zpy | Bin 0 -> 42592 bytes comp/lucas-standen-NEA/code2/zpypkg/Makefile | 4 ++ comp/lucas-standen-NEA/code2/zpypkg/zpypkg | 79 +++++++++++++++++++++ 31 files changed, 171 insertions(+), 134 deletions(-) delete mode 100644 comp/lucas-standen-NEA/code2/autodoc/Makefile delete mode 100755 comp/lucas-standen-NEA/code2/autodoc/autodoc delete mode 100644 comp/lucas-standen-NEA/code2/autodoc/autodoc.c delete mode 100644 comp/lucas-standen-NEA/code2/examples/dvd.png create mode 100755 comp/lucas-standen-NEA/code2/examples/fib_example create mode 100755 comp/lucas-standen-NEA/code2/examples/helloworld/main create mode 100644 comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy create mode 100644 comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh create mode 100644 comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c create mode 100644 comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy create mode 100755 comp/lucas-standen-NEA/code2/examples/helloworldadv/main create mode 100644 comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c create mode 100644 comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy create mode 100644 comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh delete mode 100644 comp/lucas-standen-NEA/code2/examples/raylib_example.zpy create mode 100644 comp/lucas-standen-NEA/code2/examples/raylib_example/dvd.png create mode 100755 comp/lucas-standen-NEA/code2/examples/raylib_example/main create mode 100644 comp/lucas-standen-NEA/code2/examples/raylib_example/main.zpy create mode 100644 comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh create mode 100755 comp/lucas-standen-NEA/code2/examples/spaceinvaders create mode 100755 comp/lucas-standen-NEA/code2/examples/str_example create mode 100644 comp/lucas-standen-NEA/code2/examples/tmp.zpy.c create mode 100755 comp/lucas-standen-NEA/code2/zpy create mode 100644 comp/lucas-standen-NEA/code2/zpypkg/Makefile create mode 100755 comp/lucas-standen-NEA/code2/zpypkg/zpypkg (limited to 'comp/lucas-standen-NEA/code2') diff --git a/comp/lucas-standen-NEA/code2/Makefile b/comp/lucas-standen-NEA/code2/Makefile index 126bed6..4dc4224 100644 --- a/comp/lucas-standen-NEA/code2/Makefile +++ b/comp/lucas-standen-NEA/code2/Makefile @@ -16,6 +16,7 @@ install: zpy cp ./zpy /usr/local/bin/zpy cd stdlib && make install + cd zpypkg && make install example: zpy cd examples && make diff --git a/comp/lucas-standen-NEA/code2/autodoc/Makefile b/comp/lucas-standen-NEA/code2/autodoc/Makefile deleted file mode 100644 index 76ef5c1..0000000 --- a/comp/lucas-standen-NEA/code2/autodoc/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -autodoc: autodoc.c - cc autodoc.c -o autodoc -ggdb - -install: autodoc - cp autodoc /usr/local/bin/autodoc - -uninstall: - rm /usr/local/bin/autodoc - -clean: - rm autodoc diff --git a/comp/lucas-standen-NEA/code2/autodoc/autodoc b/comp/lucas-standen-NEA/code2/autodoc/autodoc deleted file mode 100755 index 0ef6fad..0000000 Binary files a/comp/lucas-standen-NEA/code2/autodoc/autodoc and /dev/null differ diff --git a/comp/lucas-standen-NEA/code2/autodoc/autodoc.c b/comp/lucas-standen-NEA/code2/autodoc/autodoc.c deleted file mode 100644 index d8e7583..0000000 --- a/comp/lucas-standen-NEA/code2/autodoc/autodoc.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include - -typedef struct docpair { - char *doc; - char *func; -} docpair; - -docpair funcs[2048]; -int count = 0; - -//# returns a bool as to weather s2 is contained fully in s1 -bool contains(char *s1, char *s2){ - int j = 0; - if (strlen(s1) < strlen(s2)) return false; - for (int i = 0; i < strlen(s1); i++){ - if (s1[i] == s2[j]){ - if (j+1 == strlen(s2)) return true; - j++; - } - } - return false; -} - -int main(int argc, char **argv){ - FILE *in; - if (argv[1][0] == '-') in = stdin; - else in = fopen(argv[1], "r"); - - char *search = argv[2]; - - char *line = malloc(512); - char *tmp = malloc(512); - - bool nextIsFunc = false; - - while (fgets(line, 512, in) != NULL){ - strcpy(tmp, line); - tmp[4] = '\0'; - if (strcmp(tmp, "//# ") == 0){ - funcs[count].doc = malloc(strlen(line)+1); - strcpy(funcs[count].doc, line); - nextIsFunc = true; - } - else if (nextIsFunc == true){ - funcs[count].func = malloc(strlen(line)+1); - strcpy(funcs[count].func, line); - nextIsFunc = false; - count++; - } - } - - if (search != NULL){ - for (int i = 0; i < 2048; i++){ - if (funcs[i].doc != NULL) - if (contains(funcs[i].func, search)) - printf("%s \e[1m%s\e[0m\n", funcs[i].doc, funcs[i].func); - } - } - else { - for (int i = 0; i < 2048; i++){ - if (funcs[i].doc != NULL) - printf("%s \e[1m%s\e[0m\n", funcs[i].doc, funcs[i].func); - } - } - - free(line); - free(tmp); - - -} diff --git a/comp/lucas-standen-NEA/code2/comp.c b/comp/lucas-standen-NEA/code2/comp.c index d49148e..a2440e2 100644 --- a/comp/lucas-standen-NEA/code2/comp.c +++ b/comp/lucas-standen-NEA/code2/comp.c @@ -33,6 +33,14 @@ void errorhandle(int type){ exit(1); } +//# this function will check if the value given is null, if it is, it will cause a sig segv and set the error msg +void checkNULL(void *value, char *msg){ + if (value == NULL) { + errmsg = msg; + kill(pid, SIGSEGV); + } +} + char *names[] = { "defun", // takes a func name, func return type, and args // 0 "endfun", // takes no args // 1 @@ -91,6 +99,8 @@ char *vartypeToC(char *str, char *out){ } name[i] = '\0'; i++; + + if (i > strlen(str)) checkNULL(NULL, "expected var type, got nothing"); for (; i < strlen(str); i++){ if (str[i] == ':'){ @@ -114,6 +124,7 @@ char *getVarName(char *exp){ char *out = malloc(strlen(exp)); memcpy(out, exp, strlen(exp)); char *pos = strchr(out, ':'); + if (pos == NULL) checkNULL(NULL, "expected var type, got nothing"); pos[0] = '\0'; return out; } @@ -122,7 +133,8 @@ char *getVarName(char *exp){ char *getVarType(char *exp){ char *out = malloc(strlen(exp)); char *pos = strchr(exp, ':')+1; - memcpy(out, pos, strlen(pos) + 1); + if (pos == NULL) checkNULL(NULL, "expected var type, got nothing"); + memcpy(out, pos, strlen(pos) + 1); return out; } //# this will convert mathmatical expressions, to the c style of maths @@ -145,14 +157,6 @@ astNode *processChildren(astNode *node){ return node; } -//# this function will check if the value given is null, if it is, it will cause a sig segv and set the error msg -void checkNULL(void *value, char *msg){ - if (value == NULL) { - errmsg = msg; - kill(pid, SIGSEGV); - } -} - //# this function will do the bulk of converting from zpy into c code char *compile(astNode *node){ char *out = calloc(0, MAXOUTLEN); diff --git a/comp/lucas-standen-NEA/code2/examples/Makefile b/comp/lucas-standen-NEA/code2/examples/Makefile index 18a9e64..d3ee327 100644 --- a/comp/lucas-standen-NEA/code2/examples/Makefile +++ b/comp/lucas-standen-NEA/code2/examples/Makefile @@ -1,9 +1,8 @@ all: - zpy raylib_example.zpy -o raylib_example -f -lraylib -f -lm -i raylib.h zpy spaceinvaders.zpy -o spaceinvaders -f -lraylib -f -lm -i raylib.h zpy fib_example.zpy -o fib_example -f -ggdb zpy str_example.zpy -o str_example -f -ggdb - zpy syntaxerr.zpy -o syntaxerr + zpy syntaxerr.zpy -o syntaxerr clean: - rm -rf fib_example raylib_example str_example spaceinvaders tmp.zpy.c + rm -rf fib_example raylib_example str_example spaceinvaders syntaxerr tmp.zpy.c diff --git a/comp/lucas-standen-NEA/code2/examples/dvd.png b/comp/lucas-standen-NEA/code2/examples/dvd.png deleted file mode 100644 index 8e219f7..0000000 Binary files a/comp/lucas-standen-NEA/code2/examples/dvd.png and /dev/null differ diff --git a/comp/lucas-standen-NEA/code2/examples/fib_example b/comp/lucas-standen-NEA/code2/examples/fib_example new file mode 100755 index 0000000..bdd94ec Binary files /dev/null and b/comp/lucas-standen-NEA/code2/examples/fib_example differ diff --git a/comp/lucas-standen-NEA/code2/examples/helloworld/main b/comp/lucas-standen-NEA/code2/examples/helloworld/main new file mode 100755 index 0000000..653d84c Binary files /dev/null and b/comp/lucas-standen-NEA/code2/examples/helloworld/main differ diff --git a/comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy b/comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy new file mode 100644 index 0000000..ef0a288 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy @@ -0,0 +1,3 @@ +(defun main int) + (printstr "hello world\n") +(endfun) diff --git a/comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh b/comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh new file mode 100644 index 0000000..7f675c3 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh @@ -0,0 +1,2 @@ +#!/bin/sh +zpy ./main.zpy -o main diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c new file mode 100644 index 0000000..f1e746f --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c @@ -0,0 +1,4 @@ +#include +void helloworld(){ +printstr("hello world\n"); +} diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy new file mode 100644 index 0000000..9e3553b --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy @@ -0,0 +1,3 @@ +(defun helloworld void) + (printstr "hello world\n") +(endfun) diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/main b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main new file mode 100755 index 0000000..593fe40 Binary files /dev/null and b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main differ diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c new file mode 100644 index 0000000..a2b6927 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c @@ -0,0 +1,4 @@ +#include +int main(){ +helloworld(); +} diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy new file mode 100644 index 0000000..05b6155 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy @@ -0,0 +1,3 @@ +(defun main int) + (helloworld) +(endfun) diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh b/comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh new file mode 100644 index 0000000..26424d7 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh @@ -0,0 +1,4 @@ +#!/bin/sh +zpy ./main.zpy -c -o main.c +zpy ./helloworld.zpy -c -o helloworld.c +cc main.c helloworld.c /usr/local/share/zpylib/zpylib.o -o main -I/usr/local/share/zpylib/include -Wno-implicit-function-declaration diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example.zpy b/comp/lucas-standen-NEA/code2/examples/raylib_example.zpy deleted file mode 100644 index 7c6e599..0000000 --- a/comp/lucas-standen-NEA/code2/examples/raylib_example.zpy +++ /dev/null @@ -1,36 +0,0 @@ -(defun main int) - (InitWindow 800 800 "test test") - (SetTargetFPS 60) - - (let img:Image (LoadImage "dvd.png")) - (let tex:Texture (LoadTextureFromImage img)) - (UnloadImage img) - - (let x:int (randint 4 9)) - (let y:int (randint 4 9)) - (let xd:int (randint 3 5)) - (let yd:int (randint 3 5)) - - (for i:int 0 (= (WindowShouldClose) 0) 0) - (BeginDrawing) - (ClearBackground RAYWHITE) - (DrawTexture tex x y WHITE) - (EndDrawing) - - (set x (+ x xd)) - (set y (+ y yd)) - - (if (> x 750)) - (set xd -xd) - (elif (< x 0)) - (set xd -xd) - (endif) - (if (> y 750)) - (set yd -yd) - (elif (< y 0)) - (set yd -yd) - (endif) - - (endfor) - (CloseWindow) -(endfun) diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example/dvd.png b/comp/lucas-standen-NEA/code2/examples/raylib_example/dvd.png new file mode 100644 index 0000000..8e219f7 Binary files /dev/null and b/comp/lucas-standen-NEA/code2/examples/raylib_example/dvd.png differ diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example/main b/comp/lucas-standen-NEA/code2/examples/raylib_example/main new file mode 100755 index 0000000..b124ebf Binary files /dev/null and b/comp/lucas-standen-NEA/code2/examples/raylib_example/main differ diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example/main.zpy b/comp/lucas-standen-NEA/code2/examples/raylib_example/main.zpy new file mode 100644 index 0000000..cd6a382 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/raylib_example/main.zpy @@ -0,0 +1,37 @@ +//# this function is my main loop +(defun main int) + (InitWindow 800 800 "test test") + (SetTargetFPS 60) + + (let img:Image (LoadImage "dvd.png")) + (let tex:Texture (LoadTextureFromImage img)) + (UnloadImage img) + + (let x:int (randint 4 9)) + (let y:int (randint 4 9)) + (let xd:int (randint 3 5)) + (let yd:int (randint 3 5)) + + (for i:int 0 (= (WindowShouldClose) 0) 0) + (BeginDrawing) + (ClearBackground RAYWHITE) + (DrawTexture tex x y WHITE) + (EndDrawing) + + (set x (+ x xd)) + (set y (+ y yd)) + + (if (> x 750)) + (set xd -xd) + (elif (< x 0)) + (set xd -xd) + (endif) + (if (> y 750)) + (set yd -yd) + (elif (< y 0)) + (set yd -yd) + (endif) + + (endfor) + (CloseWindow) +(endfun) diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh b/comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh new file mode 100644 index 0000000..3916f3b --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh @@ -0,0 +1,4 @@ +#!/bin/sh +zpy ./main.zpy -c -o main.c -i raylib.h +cc main.c /usr/local/share/zpylib/zpylib.o -o main -I/usr/local/share/zpylib/include -Wno-implicit-function-declaration -lraylib -lm +rm -rf main.c diff --git a/comp/lucas-standen-NEA/code2/examples/spaceinvaders b/comp/lucas-standen-NEA/code2/examples/spaceinvaders new file mode 100755 index 0000000..ec88002 Binary files /dev/null and b/comp/lucas-standen-NEA/code2/examples/spaceinvaders differ diff --git a/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy b/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy index 698999a..5e51ed3 100644 --- a/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy +++ b/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy @@ -8,6 +8,7 @@ (def exists:bool) (endstruct) +//# this checks if 2 entitys are touching (defun touching bool a:entity* b:entity*) (def r1:Rectangle) (def r2:Rectangle) @@ -24,6 +25,7 @@ (return (CheckCollisionRecs r1 r2)) (endfun) +//# the main loop of the program (defun main int) (InitWindow 800 800 "test test") (SetTargetFPS 60) diff --git a/comp/lucas-standen-NEA/code2/examples/str_example b/comp/lucas-standen-NEA/code2/examples/str_example new file mode 100755 index 0000000..c543ab7 Binary files /dev/null and b/comp/lucas-standen-NEA/code2/examples/str_example differ diff --git a/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy b/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy index c74d53b..87494ed 100644 --- a/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy +++ b/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy @@ -1,3 +1,5 @@ (defun main int) - (return) + (let x:int) + (set x 10) + (return 10) (endfun) diff --git a/comp/lucas-standen-NEA/code2/examples/tmp.zpy.c b/comp/lucas-standen-NEA/code2/examples/tmp.zpy.c new file mode 100644 index 0000000..2305f24 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/examples/tmp.zpy.c @@ -0,0 +1,2 @@ +#include +int main(){ diff --git a/comp/lucas-standen-NEA/code2/parser.c b/comp/lucas-standen-NEA/code2/parser.c index 62f32fa..a84291b 100644 --- a/comp/lucas-standen-NEA/code2/parser.c +++ b/comp/lucas-standen-NEA/code2/parser.c @@ -27,7 +27,7 @@ strings *parse(FILE *f){ char *line = alloca(256); int count = 0; while (fgets(line, 256, f) != NULL){ - if (line[0] != '\n'){ + if (line[0] != '\n' && line[0] != '/'){ while (line[0] == '\t') line++; line[strlen(line)-1] = '\0'; strs->strs[count] = malloc(256); diff --git a/comp/lucas-standen-NEA/code2/zpy b/comp/lucas-standen-NEA/code2/zpy new file mode 100755 index 0000000..0c23ae3 Binary files /dev/null and b/comp/lucas-standen-NEA/code2/zpy differ diff --git a/comp/lucas-standen-NEA/code2/zpypkg/Makefile b/comp/lucas-standen-NEA/code2/zpypkg/Makefile new file mode 100644 index 0000000..dc86e53 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/zpypkg/Makefile @@ -0,0 +1,4 @@ +install: zpypkg + cp zpypkg /usr/local/bin/zpypkg +uninstall: + rm /usr/local/bin/zpypkg diff --git a/comp/lucas-standen-NEA/code2/zpypkg/zpypkg b/comp/lucas-standen-NEA/code2/zpypkg/zpypkg new file mode 100755 index 0000000..95e59c8 --- /dev/null +++ b/comp/lucas-standen-NEA/code2/zpypkg/zpypkg @@ -0,0 +1,79 @@ +#!/bin/bash + +function init () { + if [ ! -e "main.zpy" ]; then + touch main.zpy + + echo -e "(defun main int)" >> main.zpy + printf "\t(printstr \"hello world\\\n\")\n" >> main.zpy + echo -e "(endfun)" >> main.zpy + + echo "#!/bin/sh" > zpybuild.sh + echo "zpy ./main.zpy -o main" >> zpybuild.sh + else + echo "zpypkg already in use!" + fi +} + +function advinit () { + if [ ! -e "main.zpy" ]; then + touch main.zpy + + echo -e "(defun main int)" >> main.zpy + printf "\t(printstr \"hello world\\\n\")\n" >> main.zpy + echo -e "(endfun)" >> main.zpy + + touch zpybuild.sh + echo "#!/bin/sh" > zpybuild.sh + echo "zpy ./main.zpy -c -o main.c" >> zpybuild.sh + echo "cc main.c /usr/local/share/zpylib/zpylib.o -o main -I/usr/local/share/zpylib/include -Wno-implicit-function-declaration" >> zpybuild.sh + echo "rm -rf main.c" >> zpybuild.sh + + else + echo "zpypkg already in use!" + fi +} + +function build (){ + sh ./zpybuild.sh +} + +function run (){ + ./main +} + +function clean (){ + rm -f ./main +} + +function remove () { + if [ -e "main.zpy" ]; then + rm main.zpy zpybuild.sh + else + echo "zpypkg not in use!" + fi +} + +case $@ in + "init") + init + ;; + "advinit") + advinit + ;; + "build") + build + ;; + "run") + build + run + ;; + "clean") + clean + ;; + "remove") + remove + ;; + *) + echo "unknown option ${@}" +esac -- cgit v1.2.3