Skip to content

Commit

Permalink
Avoid using find, by using known paths directly
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Jun 24, 2024
1 parent fb6b2b9 commit f3b6e15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/visDQMIndexMonitoring
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ preliminary_checks() {
exit 1
fi
# Needed to get the index limits
if ! find $INSTALLATION_DIR/current/ -name "VisDQMIndex.h"; then
echo "Could not find required file \"VisDQMIndex.h\" in $INSTALLATION_DIR"
if [ ! -f "$INSTALLATION_DIR/current/apps/dqmgui/128/src/cpp/DQM/VisDQMIndex.h" ]; then
echo "Could not find required \"VisDQMIndex.h\" file in $INSTALLATION_DIR"
exit 1
fi
}

# Sources the env.sh file needed for activating the DQMGUI environment,
# then dumps the Index' catalogue to the TMP_CATALOGUE_FILE
dump_catalogue() {
source $(find $INSTALLATION_DIR/current/ -name "env.sh" | head -1)
source $INSTALLATION_DIR/current/apps/dqmgui/128/etc/profile.d/env.sh
visDQMIndex dump $INSTALLATION_DIR/state/dqmgui/$FLAVOR/ix128 catalogue >"${TMP_CATALOGUE_FILE}_${FLAVOR}"
}

check_index_limits_and_send_email() {
visdqmindex_header_file=$(find $INSTALLATION_DIR/current/ -name "VisDQMIndex.h" | head -1)
visdqmindex_header_file="$INSTALLATION_DIR/current/apps/dqmgui/128/src/cpp/DQM/VisDQMIndex.h"
msg=
# Run over all tree types
for i in $(seq 0 $((${#_tree_types[@]} - 1))); do
Expand Down

0 comments on commit f3b6e15

Please sign in to comment.