diff --git a/scripts/test-file-saving.sh b/scripts/test-file-saving.sh index 6631d09..6591dbd 100644 --- a/scripts/test-file-saving.sh +++ b/scripts/test-file-saving.sh @@ -1,7 +1,11 @@ #!/bin/bash +set -vxeuo pipefail + # shellcheck source=/dev/null -. /etc/profile.d/epics.sh +if [ -f "/etc/profile.d/epics.sh" ]; then + . /etc/profile.d/epics.sh +fi num="${1:-50}" @@ -14,6 +18,7 @@ fi caput "BASE:{Dev:Save1}:write_dir" "${data_dir}" caput "BASE:{Dev:Save1}:file_name" "saveme_{num:06d}_{uid}.h5" caput "BASE:{Dev:Save1}:stage" 1 +caget -S "BASE:{Dev:Save1}:full_file_path" for i in $(seq "$num"); do echo "$i" sleep 0.1 @@ -21,3 +26,7 @@ for i in $(seq "$num"); do done caput "BASE:{Dev:Save1}:stage" 0 + +caget -S "BASE:{Dev:Save1}:full_file_path" + +exit 0