File indexing completed on 2026-04-10 07:49:33
0001
0002
0003 usage(){ cat << EOU
0004
0005 HMM : SUSPECT HAVE REPLACED USE OF THIS WITH THE MORE CONTROLLABLE pub.py APPROACH SEE cxr_pub.sh
0006
0007
0008 ::
0009
0010 ./cxr_rsync.sh cxr_view
0011 ./cxr_rsync.sh cxr_solid
0012
0013 This will copy jpg with names starting with the NAMEPREFIX
0014 to the BASE directory with the source directory structure
0015 beneath the TMPBASE dir preserved in the copy::
0016
0017 TMPBASE $TMPBASE
0018
0019 Using rsync like this tends to result in lots of empty dirs
0020 in the destination. Find and delete those with::
0021
0022 find $HOME/simoncblyth.bitbucket.io/env/presentation/CSGOptiXRender -type d -empty
0023 find $HOME/simoncblyth.bitbucket.io/env/presentation/CSGOptiXRender -type d -empty -delete
0024
0025
0026 EOU
0027 }
0028
0029
0030 BASE=$HOME/simoncblyth.bitbucket.io/env/presentation
0031
0032 TMPBASE=/tmp/$USER/opticks/CSGOptiX/CSGOptiXRender
0033
0034 NAMEPREFIX=${1:-cxr_view}
0035 from=$TMPBASE
0036 to=$BASE
0037
0038
0039 vars="BASE TMPBASE NAMEPREFIX from to"
0040 for var in $vars ; do printf " %20s : %s \n" $var ${!var} ; done
0041
0042 find $from -name "${NAMEPREFIX}*.jpg"
0043
0044 read -p "Enter YES to proceed with rsync-ing those to $to : " ans
0045
0046 if [ "$ans" == "YES" ]; then
0047
0048 rsync -zarv --include="*/" --include="${NAMEPREFIX}*.jpg" --exclude="*" "$from" "$to"
0049
0050 find $BASE -name "${NAMEPREFIX}*.jpg"
0051
0052 else
0053 echo SKIP
0054 fi
0055
0056
0057