22 lines
370 B
Bash
22 lines
370 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
source ./common.sh
|
|
|
|
fileList=$(mktemp)
|
|
shuffleList=$(mktemp)
|
|
|
|
ls -1 "${VIDEOS}/" > "${fileList}"
|
|
rm -rf playlist.txt
|
|
|
|
count=10
|
|
for i in $(seq $count); do
|
|
cat "${fileList}" | shuf > "${shuffleList}"
|
|
while read videoIn; do
|
|
echo "file '${VIDEOS}/${videoIn}'" >> playlist.txt
|
|
done < "${shuffleList}"
|
|
done
|
|
|
|
rm -f "${fileList}"
|
|
rm -f "${shuffleList}" |