diff --git a/.gitignore b/.gitignore index 50c73ab..8e0210b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,9 @@ espfs/espfstest/espfstest html_compressed/ ldscript_memspecific.ld eagle.app.sym +*~ +# html .sass-cache node_modules build/ diff --git a/Makefile b/Makefile index 7b1fe86..953cf8b 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,7 @@ endef .PHONY: all checkdirs clean libesphttpd default-tgt -all: checkdirs $(TARGET_OUT) $(FW_BASE) +all: checkdirs htmlbuild $(TARGET_OUT) $(FW_BASE) $(Q) echo -e "\nBuild OK.\n" # libesphttpd/Makefile: @@ -193,6 +193,10 @@ all: checkdirs $(TARGET_OUT) $(FW_BASE) # $(Q) git submodule init # $(Q) git submodule update +htmlbuild: + $(vecho) "Building HTML..." + $(Q) ./html_build.sh + libesphttpd: libesphttpd/Makefile $(Q) make -C libesphttpd USE_OPENSDK=$(USE_OPENSDK) diff --git a/html_build.sh b/html_build.sh index e849c1f..ceee31e 100755 --- a/html_build.sh +++ b/html_build.sh @@ -1,5 +1,8 @@ #!/bin/bash +set -e +set -x + SRCDIR=html_src BLDDIR=html @@ -12,10 +15,12 @@ gulp cd .. cp -R "$SRCDIR/css" "$BLDDIR" -cp -R "$SRCDIR/images" "$BLDDIR" cp -R "$SRCDIR/js" "$BLDDIR" find "$BLDDIR" -name "*.map" -delete -php "$SRCDIR/home.php" > "$BLDDIR/home.tpl" -php "$SRCDIR/wifi.php" > "$BLDDIR/wifi.tpl" +mkdir -p "$BLDDIR/pages" + +php "$SRCDIR/home.php" > "$BLDDIR/pages/home.tpl" +php "$SRCDIR/wifi.php" > "$BLDDIR/pages/wifi.tpl" + diff --git a/html_src/home.php b/html_src/home.php index 150930e..5ab0831 100644 --- a/html_src/home.php +++ b/html_src/home.php @@ -2,6 +2,6 @@

System Status

-
TODO
+
This page was shown %counter% times.