Commit a5bf5e84 authored by Yan Grange's avatar Yan Grange 👋
Browse files

Adding cleanup option

parent 39dfbf30
#!/usr/bin/env bash
function cleanup() {
rm *.otest.tmp
}
# configuration:
export webdav_endpoint=DESY-WEBDAV
oidc_source=ESCAPE
......@@ -35,9 +39,8 @@ tokpid=$!
# so we wrap it in a function
function do_demo {
testfilename=$(uuidgen)
dd if=/dev/urandom of=${testfilename} bs=20480 count=10240
rclone copy ${testfilename} ${webdav_endpoint}:testdir
rm ${testfilename}
dd if=/dev/urandom of=${testfilename}.otest.tmp bs=20480 count=10240
rclone copy ${testfilename}.otest.tmp ${webdav_endpoint}:testdir
}
export uploaddir
......@@ -49,5 +52,7 @@ do
do_demo
done
cleanup
kill $tokpid
wait $tokpid 2>/dev/null
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment