summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-04-27 18:31:24 +0800
committerAaron LI <aaronly.me@outlook.com>2016-04-27 18:31:24 +0800
commit188ef5fd79ebf94fbd01f37950f08616749d19c5 (patch)
tree9d5389615a38c147f9fdb808645f1e42897a36d5
parent1f85f3116955e7da0be3249b8908aaa8d0c3f18c (diff)
downloadcexcess-188ef5fd79ebf94fbd01f37950f08616749d19c5.tar.bz2
minor updates
-rwxr-xr-xbuild_sample.sh10
-rwxr-xr-xmerge_imgdir_zzh.sh7
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