#TODO not compiled or tested
[source]
git = "https://github.com/webtorrent/webtorrent-cli"
rev = "v5.1.3"
shallow_clone = true
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}"/usr/bin/webtorrent-dir
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}"/usr/bin/webtorrent-dir
echo "#!/usr/bin/env sh \n cd /usr/bin/webtorrent-dir \n npx webtorrent-cli" > "${COOKBOOK_STAGE}"/usr/bin/webtorrent
chmod a+x "${COOKBOOK_STAGE}"/usr/bin/webtorrent
"""
[package]
dependencies = ["nodejs24"]
