seed: curriculum content

This commit is contained in:
2026-05-07 14:32:44 +00:00
parent 9258534803
commit ec76f4f56b
100 changed files with 2846 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/bash
mkdir -p cargo/food cargo/water cargo/tools inbox
touch cargo/food/manifest.txt cargo/water/manifest.txt cargo/tools/manifest.txt
echo "1 apple" > inbox/food-apple.txt
echo "1 loaf" > inbox/food-bread.txt
echo "500ml" > inbox/water-bottle.txt
echo "1L" > inbox/water-canteen.txt
echo "10mm" > inbox/tool-wrench.txt
echo "claw" > inbox/tool-hammer.txt
bash solution.sh > /dev/null 2>&1
N=0
check() {
N=$((N+1))
if eval "$1"; then echo "ok $N - $2"; else echo "not ok $N - $2"; fi
}
check '[ -f cargo/food/food-apple.txt ]' "food-apple in cargo/food"
check '[ -f cargo/food/food-bread.txt ]' "food-bread in cargo/food"
check '[ -f cargo/water/water-bottle.txt ]' "water-bottle in cargo/water"
check '[ -f cargo/water/water-canteen.txt ]' "water-canteen in cargo/water"
check '[ -f cargo/tools/tool-wrench.txt ]' "tool-wrench in cargo/tools"
check '[ -f cargo/tools/tool-hammer.txt ]' "tool-hammer in cargo/tools"
check '[ -f cargo/food/manifest.backup ]' "cargo/food/manifest.backup exists"