diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-04-27 18:31:24 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-04-27 18:31:24 +0800 |
commit | 188ef5fd79ebf94fbd01f37950f08616749d19c5 (patch) | |
tree | 9d5389615a38c147f9fdb808645f1e42897a36d5 | |
parent | 1f85f3116955e7da0be3249b8908aaa8d0c3f18c (diff) | |
download | cexcess-188ef5fd79ebf94fbd01f37950f08616749d19c5.tar.bz2 |
minor updates
-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 |