diff options
| Commit | d97b8ea76ecbed08a5ca377b45856cbc422ae9ed (patch) | |
|---|---|---|
| Author | 2023-11-23 20:00:21 +0200 | |
| Committer | 2023-11-23 20:00:21 +0200 | |
| Files | a689f0b6d835987e22f867aa6e81b42d837adcc5 | |
| syndamia.com-d97b8ea76ecbed08a5ca377b45856cbc422ae9ed.tar syndamia.com-d97b8ea76ecbed08a5ca377b45856cbc422ae9ed.tar.gz syndamia.com-d97b8ea76ecbed08a5ca377b45856cbc422ae9ed.zip | ||
| Parent | cfaa25889314416e525855e04dff50f42f0ec787 (diff) | |
[generate] Added csma submodule and updated generation to include a CSMA preprocessing step
3 files changed, 15 insertions, 2 deletions
| -rw-r--r-- | .gitmodules | 3 | ||||
| m--------- | csma | 0 | ||||
| -rwxr-xr-x | generate.sh | 14 |
diff --git a/.gitmodules b/.gitmodules index 600c751..b36ee4c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "csg"] path = csg url = https://gitlab.com/Syndamia/csg.git +[submodule "csma"] + path = csma + url = https://gitlab.com/Syndamia/csma.git diff --git a/csma b/csma new file mode 160000 +Subproject a00471ff2e26fa5f1cb6be4d9ba3d3dbdff0a57 diff --git a/generate.sh b/generate.sh index 3da2c1e..9f3c681 100755 --- a/generate.sh +++ b/generate.sh @@ -13,7 +13,17 @@ /usr/bin/env dash ./csg/csg "$REPO_FOLDER/src" "$GEN_FOLDER" '& \\— Syndamia' 'https://syndamia.com' "$AWK_FOLDER" # }}} -# 2. Tiny version, strip away styles and other stuff {{{ +# 2. CSMA to CSS {{{ + echo "[Stage 3] CSMA" + while read -r stylesheet + do + /usr/bin/env -S awk -f './csma/csmap.awk' "$stylesheet" > "${stylesheet:0: -4}css" + rm "$stylesheet" + done << EOF +$(find "$GEN_FOLDER" -type f -name "*.csma") +EOF +# }}} +# 3. Tiny version, strip away styles and other stuff {{{ [ ! -d "$GEN_TINY_FOLDER" ] && mkdir "$GEN_TINY_FOLDER" [ $# -eq 0 -a "$(stat -c %U "$GEN_TINY_FOLDER")" != "www-data" ] && echo "[Warning] Running in \"production\" while $GEN_TINY_FOLDER isn't owned by www-data!" @@ -35,7 +45,7 @@ done } - echo "[Stage 3] Tiny website" + echo "[Stage 4] Tiny website" if [ $# -eq 0 ]; then improveForTINY |