From 0a98ecaee0c78ea2dab8df463ce446f9fb49b57b Mon Sep 17 00:00:00 2001 From: "aleksandr.vodyanov" Date: Wed, 22 May 2024 17:03:27 +0300 Subject: [PATCH] up --- entrypoint.sh | 11 ----------- entrypoint2.sh | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-) create mode 100755 entrypoint2.sh diff --git a/entrypoint.sh b/entrypoint.sh index 302ef9f..6264b81 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,15 +10,4 @@ echo "Processing event '$GITHUB_EVENT_NAME'" echo "List of files with absent license:" echo "===================================" -if [ -n $INPUT_INPUT_FILES ]; then - export err=0 - for file in $INPUT_INPUT_FILES; do - echo /app/addlicense -check "$1" "$file" | sh - if [ $? -ne 0]; then - err=$? - fi - done - exit $err -else echo /app/addlicense -check "$1" "." | sh -fi diff --git a/entrypoint2.sh b/entrypoint2.sh new file mode 100755 index 0000000..302ef9f --- /dev/null +++ b/entrypoint2.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh +# Copyright (c) AVROID, Ltd., 2024 +# +# You can not use the contents of the file in any way without +# AVROID, Ltd. written permission. +# +# To obtain such a permit, you should contact AVROID, Ltd. +# at https://avroid.ru + +echo "Processing event '$GITHUB_EVENT_NAME'" +echo "List of files with absent license:" +echo "===================================" +if [ -n $INPUT_INPUT_FILES ]; then + export err=0 + for file in $INPUT_INPUT_FILES; do + echo /app/addlicense -check "$1" "$file" | sh + if [ $? -ne 0]; then + err=$? + fi + done + exit $err +else + echo /app/addlicense -check "$1" "." | sh +fi