From 96b8ba4047132102a9a886fcabae2f9814ce3f8a Mon Sep 17 00:00:00 2001 From: Benjamin Alan Weaver Date: Thu, 25 Apr 2024 09:37:45 -0700 Subject: [PATCH] fix possible glob error --- bin/desi_tucson_transfer_catchup.sh | 56 ++++++----------------------- 1 file changed, 10 insertions(+), 46 deletions(-) diff --git a/bin/desi_tucson_transfer_catchup.sh b/bin/desi_tucson_transfer_catchup.sh index 90f40cb..28ef2ef 100755 --- a/bin/desi_tucson_transfer_catchup.sh +++ b/bin/desi_tucson_transfer_catchup.sh @@ -10,11 +10,20 @@ if [[ -z "${DESI_ROOT}" ]]; then echo "ERROR: DESI_ROOT is undefined!" exit 1 fi +# +# Do not expand globs, pass them on to rsync. +# +set -o noglob +# +# Configuration. +# syn="/usr/bin/rsync --archive --verbose --delete --delete-after --no-motd --password-file ${HOME}/.desi" src=rsync://${DESISYNC_HOSTNAME}/desi dst=${DESI_ROOT} log_root=${HOME}/Documents/Logfiles - +# +# Execute rsync commands. +# for d in engineering/focalplane engineering/focalplane/hwtables \ spectro/data \ spectro/redux/daily spectro/redux/daily/exposures spectro/redux/daily/preproc spectro/redux/daily/tiles \ @@ -34,48 +43,3 @@ for d in engineering/focalplane engineering/focalplane/hwtables \ echo "${priority} ${syn} ${exclude} ${src}/${d}/ ${dst}/${d}/ &>> ${log} &" ${priority} ${syn} ${exclude} ${src}/${d}/ ${dst}/${d}/ &>> ${log} & done - -# log=${log_root}/catchup_engineering_focalplane.log -# [[ -f ${log} ]] || touch ${log} -# nice ${syn} --exclude archive --exclude hwtables --exclude \*.ipynb --exclude .ipynb_checkpoints \ -# ${src}/engineering/focalplane/ ${dst}/engineering/focalplane/ &>> ${log} & - -# log=${log_root}/catchup_engineering_focalplane_hwtables.log -# [[ -f ${log} ]] || touch ${log} -# nice ${syn} --include \*.csv --exclude \* \ -# ${src}/engineering/focalplane/hwtables/ ${dst}/engineering/focalplane/hwtables/ &>> ${log} & - -# log=${log_root}/catchup_spectro_data.log -# [[ -f ${log} ]] || touch ${log} -# ${syn} --exclude 2018\* --exclude 2019\* --exclude 2020\* --exclude 2021\* --exclude 2022\* \ -# ${src}/spectro/data/ ${dst}/spectro/data/ &>> ${log} & - -# log=${log_root}/catchup_spectro_redux_daily.log -# [[ -f ${log} ]] || touch ${log} -# ${syn} --exclude \*.tmp --exclude attic --exclude exposures --exclude preproc --exclude temp --exclude tiles \ -# ${src}/spectro/redux/daily/ ${dst}/spectro/redux/daily/ &>> ${log} & - -# log=${log_root}/catchup_spectro_redux_daily_exposures.log -# [[ -f ${log} ]] || touch ${log} -# ${syn} --exclude \*.tmp \ -# ${src}/spectro/redux/daily/exposures/ ${dst}/spectro/redux/daily/exposures/ &>> ${log} & - -# log=${log_root}/catchup_spectro_redux_daily_preproc.log -# [[ -f ${log} ]] || touch ${log} -# ${syn} --exclude \*.tmp --exclude preproc-\*.fits --exclude preproc-\*.fits.gz \ -# ${src}/spectro/redux/daily/preproc/ ${dst}/spectro/redux/daily/preproc/ &>> ${log} & - -# log=${log_root}/catchup_spectro_redux_daily_tiles.log -# [[ -f ${log} ]] || touch ${log} -# ${syn} --exclude \*.tmp --exclude temp \ -# ${src}/spectro/redux/daily/tiles/ ${dst}/spectro/redux/daily/tiles/ &>> ${log} & - -# log=${log_root}/catchup_spectro_nightwatch_kpno.log -# [[ -f ${log} ]] || touch ${log} -# nice ${syn} \ -# ${src}/spectro/nightwatch/kpno/ ${dst}/spectro/nightwatch/kpno/ &>> ${log} & - -# log=${log_root}/catchup_spectro_staging_lost+found.log -# [[ -f ${log} ]] || touch ${log} -# nice ${syn} \ -# ${src}/spectro/staging/lost+found/ ${dst}/spectro/staging/lost+found/ &>> ${log} &