ddat interop with dat js cable interop with cabal js ddat's frontend = dat-thang cable fe = cable-thang dillo support based on cel's dillo-dat bootstrap node xplatform support Signed-off-by: divo <418@cryspace.space>
16 lines
791 B
Bash
16 lines
791 B
Bash
#!/bin/bash
|
|
set -eu
|
|
repo=$(CDPATH= cd -- "$(dirname -- "$0")/../../.." && pwd)
|
|
key_file=${DILLO_DPID_KEY_FILE:-"$HOME/.dillo/dpid_comm_keys"}
|
|
dpi_bin=${DAT_DPI_BIN:-/usr/local/lib/dillo/dpi/dat/dat.dpi.exe}
|
|
output="$repo/local-data/test-runs/dillo/real-site-dpi.response"
|
|
mkdir -p "$(dirname -- "$output")"
|
|
read -r _ secret _ < "$key_file"
|
|
{
|
|
printf "<cmd='auth' msg='%s' '>\n" "$secret"
|
|
printf "%s\n" "<cmd='open_url' url='dat://4a93f5824c7f4a39d485c84a4de0f563a33915954e7ee3f10ea3f6699f2a9ee8/' '>"
|
|
printf "%s\n" "<cmd='open_url' url='dat://4a93f5824c7f4a39d485c84a4de0f563a33915954e7ee3f10ea3f6699f2a9ee8/dat-logo.png' '>"
|
|
printf "%s\n" "<cmd='DpiBye' '>"
|
|
} | "$dpi_bin" > "$output"
|
|
grep -E "start_send_page|Site is online|The site is online|Content-Type|Content-Length" "$output"
|