From 7a3dd171f73cf328c170bde1a11c1b7eebb015da Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sun, 16 Jan 2022 05:07:46 +0300 Subject: [PATCH] upd build.cfg --- .shellcheck/build.cfg | 14 ++++++++++++++ builder | 25 ++++++++++++++++++++++--- common.lib | 5 +++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.shellcheck/build.cfg b/.shellcheck/build.cfg index 0e9cc14..b484a76 100644 --- a/.shellcheck/build.cfg +++ b/.shellcheck/build.cfg @@ -1,2 +1,16 @@ +# Build parameters + +# If True - compresses the mutator when compiling +# Scripts will be stored in binary form +# (reduces the size of the output file) +StripSource="True" + +# Mutators to be compiled +# Specify them with a space as a separator, +# Mutators will be compiled in the specified order PackageBuildOrder="SomePackageName SomePackageNameMut" + +# Mutators that will be uploaded to the workshop +# Specify them with a space as a separator, +# The order doesn't matter PackageUpload="SomePackageName SomePackageNameMut" diff --git a/builder b/builder index b836df4..f44cfd6 100644 --- a/builder +++ b/builder @@ -128,8 +128,24 @@ function init_build () fi done < <(find "$MutSource" -mindepth 2 -maxdepth 2 -type d -ipath '*/Classes' | sed -r 's|.+/([^/]+)/[^/]+|\1|' | sort) - echo "PackageBuildOrder=\"$PackageList\"" >> "$MutBuildConfig" - echo "PackageUpload=\"$PackageList\"" >> "$MutBuildConfig" + cat > "$MutBuildConfig" < /dev/null do diff --git a/common.lib b/common.lib index dddb198..304c890 100644 --- a/common.lib +++ b/common.lib @@ -8,6 +8,11 @@ function reg_readkey () # $1: path, $2: key awk '{ $1=$2=""; print $0 }' ) } +function is_true () # $1: Bool arg to check +{ + echo "$1" | grep -Piq '^true$' +} + function get_latest () # $1: Reponame, $2: filename, $3: output filename { local ApiUrl="https://api.github.com/repos/$1/releases/latest"