make caching for faster ./make dev
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Fabien Benetou 2025-07-17 15:27:12 +02:00
parent 9dcbea7eba
commit e806106aa0

11
make
View file

@ -80,10 +80,13 @@ standalone(){ # build standalone xrsh.com binary
dev(){ # start dev http server
set -x
cd "$DIR"
wget "$REDBEAN_VERSION" -O /tmp/server.com
chmod +x /tmp/server.com
test -f /tmp/cert.pem || openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout /tmp/key.pem -out /tmp/cert.pem
/tmp/server.com -c 0 -C /tmp/cert.pem -K /tmp/key.pem -D . "$@"
if [ ! -f server.com ]; then
echo "Server not found!"
wget "$REDBEAN_VERSION" -O server.com
chmod +x server.com
fi
test -f cert.pem || openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
server.com -c 0 -C cert.pem -K key.pem -D . "$@"
}
shell(){ # run xrsh shell via docker