From dc8f4889145b562b79dd0efa9171dba09d980ae5 Mon Sep 17 00:00:00 2001 From: Shorokhov Sergey Date: Mon, 18 Dec 2023 11:11:21 +0300 Subject: [PATCH] test ci --- .github/workflows/CI.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1fcbf5b..766f729 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -91,13 +91,21 @@ jobs: run: | mkdir ../plugins/ - find * -name "*.sma" \ - -exec echo -e "\n\n> Compile {} <" \;\ - -exec ${amxxpc} {} \ + compile() { + sourcefile=$1 + amxxfile="$(echo $sourcefile | sed -e 's/\.sma$/.amxx/')" + output_path="../plugins/$amxxfile" + + mkdir -p $(dirname $output_path) + + echo -n "Compiling $sourcefile ... " + amxxpc $sourcefile -o"$output_path" \ -i"include" \ - -i"$REAPI_INCLUDE" \ - -o../plugins/{} \ - \; + -i"$REAPI_INCLUDE" + } + export -f compile + + find * -type f -name "*.sma" -exec bash -c 'compile "$0"' {} \; - name: Move files run: |