mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix prebuild scripts one more time (#55059)
* Better * Update build.sh I made it a little bit shorter. The main value here that you changed negative condition with positive one. That excludes the cases when some error occur in condition. Since some error during calculation a predicate does not mean that predicate is false logically. It means predicate is just failed. Bash is hard in distinguishing such cases. * Update build.sh --------- Co-authored-by: Sema Checherinda <104093494+CheSema@users.noreply.github.com>
This commit is contained in:
parent
e9c3032f83
commit
02ac8d56ef
@ -55,15 +55,21 @@ ccache_status
|
||||
# clear cache stats
|
||||
ccache --zero-stats ||:
|
||||
|
||||
function check_prebuild_exists() {
|
||||
local path="$1"
|
||||
[ -d "$path" ] && [ "$(ls -A "$path")" ]
|
||||
}
|
||||
|
||||
# Check whether the directory with pre-build scripts exists and not empty.
|
||||
if [ ! -d "/build/packages/pre-build" ] || [ -n "$(ls -A /build/packages/pre-build)" ]; then
|
||||
echo "There are no subcommands to execute :)"
|
||||
else
|
||||
if check_prebuild_exists /build/packages/pre-build
|
||||
then
|
||||
# Execute all commands
|
||||
for file in /build/packages/pre-build/*.sh ;
|
||||
do
|
||||
bash "$file"
|
||||
done
|
||||
else
|
||||
echo "There are no subcommands to execute :)"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_MUSL_KEEPER" == "1" ]
|
||||
|
Loading…
Reference in New Issue
Block a user