Add safety barrier to c_scan_N_fixed (to avoid accidental data loss)

This commit is contained in:
Jean-Sébastien 2021-12-14 21:12:20 +01:00
父節點 5e22173316
當前提交 0c3ad996b0
共有 1 個檔案被更改,包括 11 行新增0 行删除

查看文件

@ -80,6 +80,17 @@ done
basedir="$(pwd)"
# Safety barrier:
# if directory exists, don't do anything and request directory deletion before proceeding
dircheck='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data/N_'$N
echo $dircheck
if [[ -d $dircheck ]]; then
echo 'A c scan with these parameters already exists. Aborting.'
echo 'If you really want to run this command, please first delete directory:\n'$dircheck
exit
fi
for c in $clist
do
echo '** Starting run for c =' $c', N = '$N | tee -a $logfile