diff options
| author | garret1317 <garret@airmail.cc> | 2025-11-13 09:59:23 +0000 |
|---|---|---|
| committer | garret1317 <garret@airmail.cc> | 2025-11-13 09:59:23 +0000 |
| commit | 303a05033116b77f42eb63bc405d7aa72dcb12d9 (patch) | |
| tree | 41431dbb97134644d34fe03980cad330bfaa5de2 | |
| parent | 49418515af5e8be625c91e59286dfcbd41e7491a (diff) | |
| download | yt-dlp-rajiko-303a05033116b77f42eb63bc405d7aa72dcb12d9.tar.gz yt-dlp-rajiko-303a05033116b77f42eb63bc405d7aa72dcb12d9.tar.bz2 yt-dlp-rajiko-303a05033116b77f42eb63bc405d7aa72dcb12d9.zip | |
bundle script: include licence files in the bundle zip
not _really_ needed right now since the only dep (protobug) is Unlicense
but might be useful in future if i ever have to use some MIT-licenced one for example
also it gives a nice way to signify the plugin version number _in_ the file
(not just the .zip filename)
| -rwxr-xr-x | contrib/bundle.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/contrib/bundle.sh b/contrib/bundle.sh index e51d6bc..cef3f79 100755 --- a/contrib/bundle.sh +++ b/contrib/bundle.sh @@ -2,7 +2,17 @@ version="$(uv tool run hatch version)" mkdir bundle/ uv pip install --python-version 3.9 --python-platform linux --requirements pyproject.toml --target bundle/yt_dlp_plugins/ -rm -rf bundle/yt_dlp_plugins/*.dist-info bundle/yt_dlp_plugins/bin uv pip install --python-version 3.9 --python-platform linux --no-deps --target bundle/ . + +for lib_distinfo in bundle/yt_dlp_plugins/*.dist-info bundle/*.dist-info; do + lib=$(basename "$lib_distinfo" .dist-info) + for licence_file in "$lib_distinfo"/licenses/*; do + licence_filename=$(basename "$licence_file") + cp "${licence_file}" "bundle/${lib}_${licence_filename}" + done +done + +rm -rf bundle/yt_dlp_plugins/*.dist-info bundle/*.dist-info bundle/yt_dlp_plugins/bin + mkdir -p dist/ -(cd bundle/ && zip -9 --recurse-paths ../dist/yt_dlp_rajiko-${version}.bundle.zip yt_dlp_plugins) +(cd bundle/ && zip -9 --recurse-paths ../dist/yt_dlp_rajiko-"${version}".bundle.zip .) |