Skip to content

Commit

Permalink
fix possible glob error
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Apr 25, 2024
1 parent 47681da commit 96b8ba4
Showing 1 changed file with 10 additions and 46 deletions.
56 changes: 10 additions & 46 deletions bin/desi_tucson_transfer_catchup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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} &

0 comments on commit 96b8ba4

Please sign in to comment.