xrsh-buildroot/buildroot-v86/board/v86/rootfs_overlay/bin/wget

24 lines
310 B
Text
Raw Normal View History

2025-06-20 17:16:55 +02:00
#!/bin/sh
#
# this is a curl/wget stub which
# substitute it with browser's javascript fetch()
url="$1"
js = '
url = args[0]
ret = 0
fetch(url)
.then( (res) => res.arrayBuffer() )
.then( (abuf) => {
buf = new Uint8Array(abuf)
})
.catch( (e) => {
done = true
ret = 1
})
'
# wait for response filese