Commit 1270ff0a authored by Thomas Braun's avatar Thomas Braun
Browse files

ci/check-header-guard.sh: Remove special casing of log4tango/include

This is now below src/include.
parent e6fddd07
Loading
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -19,18 +19,15 @@ for _file in "$@"; do
  _guard=$(awk '/^#ifndef/ { print $2; exit }' < $_file)

  _path_from_src=$(realpath -m --relative-to=src/include $_file)
  _path_from_log4tango=$(realpath -m --relative-to=log4tango/include $_file)
  _path_from_test=$(realpath -m --relative-to=tests $_file)

  if ! [[ ${_path_from_src} =~ "../" ]]; then
    _expected=$(echo ${_path_from_src} | tr '[:lower:]' '[:upper:]' | tr '/.' '_')
  elif ! [[ ${_path_from_log4tango} =~ "../" ]]; then
    _expected=$(echo ${_path_from_log4tango} | tr '[:lower:]' '[:upper:]' | tr '/.' '_')
  elif ! [[ ${_path_from_test} =~ "../" ]]; then
    _expected=$(echo ${_path_from_test} | tr '[:lower:]' '[:upper:]' | tr '/.' '_')
    _expected=$(echo TANGO_TEST_${_expected})
  else
    echo >&2 "check-header-guard.sh: error: '$_file' is not realtive to 'src/include/', 'log4tango/include' or 'tests/'"
    echo >&2 "check-header-guard.sh: error: '$_file' is not realtive to 'src/include/' or 'tests/'"
    exit 2
  fi