Add helper scripts

This commit is contained in:
Augusto Gunsch
2021-11-02 16:33:23 -03:00
parent 64c13e2974
commit 9a3cff1cfa
3 changed files with 108 additions and 34 deletions

25
local/bin/dlsubs Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
LANG=pob
usage() {
echo "usage: dlsubs <files>"
exit 1
}
[ -z "$1" ] && usage
for arg in "$@"; do
case "$arg" in
*.mkv|*.mp4 )
if [ ! -f "$arg" ]; then
echo "$arg is not a file"
usage
fi ;;
*) echo "$arg is neither a .mkv nor a .mp4 file"; usage ;;
esac
done
for input in "$@"; do
subdl --lang=$LANG "$input"
done