21 lines
368 B
Bash
21 lines
368 B
Bash
#!/usr/bin/env sh
|
|
|
|
[ -z "$1" -o ! -f "$1" ] && exit 1
|
|
|
|
length="$(cat "$1" | wc -l)"
|
|
|
|
current_video=0
|
|
while [ $length -ne $current_video ]
|
|
do
|
|
current_video="$(( $current_video + 1 ))"
|
|
|
|
video="$(cat "$1" | sed "$current_video q;d")"
|
|
|
|
mpv "$video"
|
|
|
|
length="$(cat "$1" | wc -l)"
|
|
if [ "$length" -eq "$current_video" ]; then
|
|
sleep 5m
|
|
fi
|
|
done
|