#! /bin/bash# This hack is a wrapper to GraphViz dot that removes any nodes that# are contained in the following list.LABELS_TO_FILTER="QObject Item"ARGS=$@for ARG in${ARGS}do if[-e${ARG}]thenFILENAME=$(basename"${ARG}")EXT="${FILENAME##*.}"if[${EXT}=="dot"]thenDOT_FILE=${ARG}for LABEL_TO_FILTER in${LABELS_TO_FILTER}doNODE_NAME=$(grep"label=\"${LABEL_TO_FILTER}\""${DOT_FILE} | awk'{print $1}')if[[!-z"${NODE_NAME}"]]thenecho"${NODE_NAME} is labelled ${LABEL_TO_FILTER}, filtering..."sed-i-e"/${NODE_NAME}/d"${DOT_FILE}fi donebreakfi fidone/usr/local/bin/dot ${ARGS}