diff options
-rwxr-xr-x | build_sample.sh | 10 | ||||
-rwxr-xr-x | merge_imgdir_zzh.sh | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/build_sample.sh b/build_sample.sh index bf205d0..c7020cf 100755 --- a/build_sample.sh +++ b/build_sample.sh @@ -107,8 +107,14 @@ while [ ! -z "$2" ]; do if [ "${OWNER}" = "lwt" ]; then cp -av ${repro_dir}/img . elif [ "${OWNER}" = "zzh" ]; then - cp -av ${repro_dir}/../evt2/img . - cp -av ${repro_dir}/../evt2/spc/profile/rspec.reg ./img/ + img_dir="${repro_dir}/../evt2/img" + if [ -f "${img_dir}/sbprofile.txt" ]; then + cp -av ${img_dir} . + cp -av ${repro_dir}/../evt2/spc/profile/rspec.reg ./img/ + else + echo "WARNING: '${img_dir}/sbprofile.txt' does not exists" + cp -av ${repro_dir}/img . + fi fi # apply clean up find . \( -iname '*_bak' -o -iname '_tmp*' \) -delete diff --git a/merge_imgdir_zzh.sh b/merge_imgdir_zzh.sh index 3f62b95..881eccf 100755 --- a/merge_imgdir_zzh.sh +++ b/merge_imgdir_zzh.sh @@ -27,9 +27,14 @@ while [ ! -z "$1" ]; do cd ${INIT_DIR} cd ${repro_dir} echo "*** ${PWD} ***" + if [ ! -d "${IMG2_DIR}" ]; then + echo "WARNING: '${IMG2_DIR}' does not exists; skipped!" + continue + fi # clean ${IMG_DIR} and ${IMG2_DIR} ( cd ${IMG_DIR}; \ - rm -fv _* *.log *bak evt2_*.fits img_*.fits smooth.fits; ) + rm -fv _* *.log *bak evt2_*.fits img_*.fits smooth.* raw.txt \; + rm -fv test* tmp* ) ( cd ${IMG2_DIR}; \ rm -fv rspec* sbprofile* radius_sbp.txt flux_sbp.txt ) # merge |