bachelor-thesis/infrastructure/ansible/roles/mft-create-test-files/files/create-test-files.sh

21 lines
459 B
Bash
Executable file

#!/bin/bash
dest=$1
test_dir=$2
tixstream_user=$4
tixstream_group=$5
if [ "${dest}" == "" ]; then
dest="/tmp"
fi
echo "this is a plain text dummy metadata file" >${dest}/metadata.txt
truncate -s 5g ${dest}/${test_dir}/5g.mxf
truncate -s 1g ${dest}/${test_dir}/1g.mxf
for i in {1..100}; do
dd if=/dev/urandom of=/local_testdata/test-source/small_$i.dat bs=1M count=10 status=none
done
chown ${tixstream_user}:${tixstream_group} ${dest}/${test_dir}/*