Skip to content

Commit 2c83859

Browse files
committed
fix detecting MAJOR_VERSION in linux
1 parent b721569 commit 2c83859

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
2020
else
2121
BUILD_FOLDER=".build/debug"
2222
swift build --disable-sandbox
23-
MAJOR_VERSION=$(swift --version | awk '{for(i=1;i<=NF;i++){if($i ~ /^[0-9]+\.[0-9]+$/){print $i; break}}}' | cut -d '.' -f 1)
23+
MAJOR_VERSION=$(swift --version | awk '{for(i=1;i<=NF;i++){if($i ~ /^[0-9]+\.[0-9]+\.[0-9]?$/){print $i; break}}}' | cut -d '.' -f 1)
2424
fi
2525

2626
mkdir -p "$PREFIX/bin"

0 commit comments

Comments
 (0)