2023-06-27 02:36:42 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# Download and update deps for binary
|
|
|
|
|
|
|
|
# get the directory of this script file
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
PUBLIC=$DIR/public
|
|
|
|
|
2023-07-02 20:50:14 +02:00
|
|
|
echo "download js bundle files"
|
2023-07-02 20:30:23 +02:00
|
|
|
curl https://npm.reversehttp.com/@preact/signals-core,@preact/signals,htm/preact,preact,preact/hooks > $PUBLIC/index.js
|
2023-06-27 02:45:22 +02:00
|
|
|
echo >> $PUBLIC/index.js # add newline
|
2023-06-27 02:36:42 +02:00
|
|
|
|
2023-07-02 20:50:14 +02:00
|
|
|
echo "generate hpp files"
|
|
|
|
xxd -n index_html -i $PUBLIC/index.html > $DIR/index.html.hpp
|
|
|
|
xxd -n index_js -i $PUBLIC/index.js > $DIR/index.js.hpp
|