Add safety barrier to c_scan_N_fixed (to avoid accidental data loss)
This commit is contained in:
父節點
5e22173316
當前提交
0c3ad996b0
|
@ -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
|
||||
|
|
載入中…
新增問題並參考