From f8c7c12f5b0c62ca8b4dde6e31e8b862d1c41fa2 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Thu, 3 Mar 2022 12:29:15 +0100 Subject: [PATCH] add check_script --- check_script.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 check_script.sh diff --git a/check_script.sh b/check_script.sh new file mode 100755 index 00000000..7268150f --- /dev/null +++ b/check_script.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +check_directory() { + if ! head -n 20 $FILE | grep -q "Permission is hereby granted, free of charge, to any person obtaining a copy" + then + echo "$FILE does not contain a current copyright header" + fi +} + +for FILE in $(find owncloudComLibrary/src -name "*.java" -o -name "*.kt") +do + check_directory +done + +./gradlew ktlintFormat