Generate XDS.INP: Difference between revisions

→‎The script: Mac sed fix for site-file
(→‎The script: fix sed error for Mac, which does not support \|)
(→‎The script: Mac sed fix for site-file)
Line 1,231: Line 1,231:
# TODO: some detectors don't set DET_SN so this is not always unique
# TODO: some detectors don't set DET_SN so this is not always unique
test "$DET_SN" != "" && DET="${DET}_$DET_SN"
test "$DET_SN" != "" && DET="${DET}_$DET_SN"
DET=$(echo $DET | sed 's/ /_/g;s/\W//g;')
DET=$(echo $DET | sed 's/ /_/g;s/[^-_A-Za-z0-9]//g;')
file="$HOME/.xds-site/$DET"
file="$HOME/.xds-site/$DET"
if [ -f $file ]; then
if [ -f $file ]; then
27

edits