diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-06-02 21:28:39 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-06-02 21:28:39 +0530 |
| commit | 49bc31720ab6206980cda95a0a30a44e7f882fcc (patch) | |
| tree | 9dc6540563d04dd4daceb8b716d83b15a0de89d3 /justfile | |
| parent | 4ccc095ed2efeda97805bdfb9473f62ed46220b7 (diff) | |
| download | sqlite-creative-coding-49bc31720ab6206980cda95a0a30a44e7f882fcc.tar.gz sqlite-creative-coding-49bc31720ab6206980cda95a0a30a44e7f882fcc.zip | |
Clean up the c stuff and switch to simple bash + add example
Diffstat (limited to '')
| -rw-r--r-- | justfile | 27 |
1 files changed, 7 insertions, 20 deletions
@@ -1,27 +1,14 @@ -set export +setup: setup-db -CC := "cc" -CFLAGS := f"-std=c11 -O2 \ --Wall -Wextra -Wshadow -Wformat=2 -fsanitize=address,undefined \ -{{shell('pkg-config --cflags --libs sqlite3')}}" -OUTDIR := "build" +run file *args: setup-db + sqlite3 fun.db {{args}} < {{file}} -build: compile-flags - mkdir -p "{{OUTDIR}}" - {{CC}} {{CFLAGS}} src/*.c -o "{{OUTDIR}}/sqlheavy" +image image_id: + ./image.sh {{image_id}} | magick display -resize 500% - -run: build - "./{{OUTDIR}}/sqlheavy" - -@compile-flags: - echo '{{CFLAGS}}' | tr ' ' '\n' > ./compile_flags.txt - -format: - find src/ -iname '*.h' -o -iname '*.c' | xargs clang-format -i +repl *args: + rlwrap sqlite3 fun.db {{args}} setup-db: rm fun.db sqlite3 fun.db < setup.sql - -image: - just run | magick display -resize 500% - |
