build.sh fix jobs option parsing

glibc_test.sh: reworked pattern
This commit is contained in:
s1lentq 2021-04-13 04:35:26 +07:00
parent 7bd3d73b79
commit 1d15946cff
3 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ for i in "$@"
do
case $i in
-j=*|--jobs=*)
jobs="${i#*=}"
jobs="-j${i#*=}"
shift
;;
-c=*|--compiler=*)
@ -33,7 +33,7 @@ esac
rm -rf build
mkdir build
pushd build
pushd build &> /dev/null
CC=$CC CXX=$CXX cmake ${args[@]} ..
make -j${jobs}
popd
make ${jobs}
popd > /dev/null

View File

@ -22,7 +22,7 @@ main()
elif [ "$version" = "PRIVATE" ]; then
version="PRV"
# ensure numeric
elif [[ $version =~ ^[0-9]+$ ]]; then
elif [[ $version =~ ^([0-9]+\.){0,2}(\*|[0-9]+)$ ]]; then
check_version_greater $version ${threshold_version[$k]}
if [[ $? -eq 1 ]]; then
echo -e "\033[0;31mAssertion failed:\033[0m Binary \033[0;32m${f}\033[0m has ${k}_\033[0;33m$version\033[0m greater than max version ${k}_\033[0;33m${threshold_version[$k]}\033[0m"