every.channel: sanitized baseline
This commit is contained in:
commit
897e556bea
258 changed files with 74298 additions and 0 deletions
34
scripts/vendor-yt-dlp.sh
Executable file
34
scripts/vendor-yt-dlp.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin) platform="macos" ;;
|
||||
Linux) platform="linux" ;;
|
||||
MINGW*|MSYS*|CYGWIN*) platform="windows" ;;
|
||||
*) platform="unknown" ;;
|
||||
esac
|
||||
|
||||
if [[ "${platform}" == "unknown" ]]; then
|
||||
echo "Unsupported platform for bundling yt-dlp" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEST="${ROOT}/apps/tauri/resources/yt-dlp/${platform}/venv"
|
||||
|
||||
if command -v uv >/dev/null 2>&1; then
|
||||
uv venv "${DEST}" --python 3.12
|
||||
"${DEST}/bin/python" -m pip install --upgrade pip
|
||||
"${DEST}/bin/python" -m pip install --upgrade yt-dlp
|
||||
else
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
echo "python3 not found; install python or uv" >&2
|
||||
exit 1
|
||||
fi
|
||||
python3 -m venv "${DEST}"
|
||||
"${DEST}/bin/python" -m pip install --upgrade pip
|
||||
"${DEST}/bin/python" -m pip install --upgrade yt-dlp
|
||||
fi
|
||||
|
||||
echo "yt-dlp bundled at ${DEST}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue