unix-tools
ls, find, sh, nc, make and a dozen more classic Unix tools, rewritten from scratch in Ridgun
| 1 | -- build.rg — Project build definition for unix-tools |
| 2 | -- @implements ADR-0001 |
| 3 | |
| 4 | fn :: project name => String |
| 5 | project name = "unix-tools" |
| 6 | |
| 7 | fn :: project version => String |
| 8 | project version = "0.1.0" |
| 9 | |
| 10 | fn :: main entry => String |
| 11 | main entry = "src/main/ridgun/jot/main.rg" |
| 12 | |
| 13 | fn :: source dir => String |
| 14 | source dir = "src/main/ridgun" |
| 15 | |
| 16 | fn :: test dir => String |
| 17 | test dir = "src/test/ridgun" |
| 18 | |
| 19 | fn :: target dir => String |
| 20 | target dir = "target" |
| 21 | |
| 22 | fn :: dependencies => [String] |
| 23 | dependencies = ["~/ridgun/libs/src/main/ridgun/lib/posix.rg", "~/ridgun/libs/src/main/ridgun/lib/io.rg", "~/ridgun/libs/src/main/ridgun/lib/crypto.rg", "~/ridgun/libs/src/main/ridgun/lib/socket.rg"] |
| 24 | |
| 25 | fn :: task sync libs => String |
| 26 | task sync libs = "mkdir -p .stable/deps target && for l in posix io crypto argon2id socket; do cp -f ~/ridgun/libs/target/bundles/$l.rglib .stable/deps/$l.rglib && cp -f .stable/deps/$l.rglib target/$l.rglib; done" |
| 27 | |
| 28 | fn :: task strict binaries => String |
| 29 | task strict binaries = "mkdir -p target && for u in jot rs lam vis unvis mdrr ls find mtree mktemp apply make sh timeout nc doas sha256; do ridgunc build --strict src/main/ridgun/$u/main.rg -o target/$u || exit 1; done" |