Skip to content

Commit

Permalink
Fix GHA copyright script for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasDuswald committed Dec 20, 2021
1 parent 0e29fdc commit e943961
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
14 changes: 14 additions & 0 deletions test/unit/core/count_neighbor_functor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & University of Surrey for the benefit of the
// BioDynaMo collaboration. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// See the LICENSE file distributed with this work for details.
// See the NOTICE file distributed with this work for additional information
// regarding copyright ownership.
//
// -----------------------------------------------------------------------------

#ifndef COUNT_NEIGHBOR_FUNCTOR_H_
#define COUNT_NEIGHBOR_FUNCTOR_H_

Expand Down
11 changes: 9 additions & 2 deletions util/housekeeping/check-copyright.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# -----------------------------------------------------------------------------
#
# Copyright (C) 2021 CERN & University of Surrey for the benefit of the
Expand Down Expand Up @@ -26,12 +26,19 @@ NUM_FALSE_FILES=0
COPYRIGHT_FILE=$1
shift

set -e

for file in $@; do
# Ingore copyrights of demo/epidemiology because of Lukas private copyright
if [[ $file == *"demo/epidemiology/"* ]];then
continue
fi
if [[ $(comm -23 $COPYRIGHT_FILE $file) ]]; then
if [ "$(uname)" = 'Darwin' ]; then
COMM_OPTIONS="-23"
else
COMM_OPTIONS="--nocheck-order -23"
fi
if [[ $(comm $COMM_OPTIONS $COPYRIGHT_FILE $file) ]]; then
echo "$file : Licence is not correct."
# # Uncomment this to get diff output between desired copyright and current
# # state.
Expand Down

0 comments on commit e943961

Please sign in to comment.