31 lines
603 B
Fish
Executable File
31 lines
603 B
Fish
Executable File
#!/bin/env fish
|
|
|
|
set DIR (dirname (status -f))
|
|
|
|
if ! type -q curl
|
|
echo "curl is required to run this script"
|
|
exit
|
|
end
|
|
|
|
if ! type -q chromedriver || ! type -q chromium-browser
|
|
echo "both chromium-browser and chromedriver are required to run this script"
|
|
exit
|
|
end
|
|
|
|
if ! type -q ffmpeg
|
|
echo "ffmpeg is required to run this script"
|
|
exit
|
|
end
|
|
|
|
|
|
if ! test -d "$DIR/venv"
|
|
/bin/env python3 -m venv "$DIR/venv"
|
|
. "$DIR/venv/bin/activate.fish"
|
|
/bin/env python3 -m pip install -r "$DIR/requirements.txt"
|
|
echo
|
|
else
|
|
. "$DIR/venv/bin/activate.fish"
|
|
end
|
|
|
|
/bin/env python3 "$DIR/download.py" $argv
|