aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
m---------src/bun.js/WebKit0
-rw-r--r--src/cli/install.sh16
2 files changed, 14 insertions, 2 deletions
diff --git a/src/bun.js/WebKit b/src/bun.js/WebKit
-Subproject ae3c6f3fd24fc10da1ea124dbba0d188dcf46c9
+Subproject 4d6ee41032866e63aa43ba007616c632ed1c90a
diff --git a/src/cli/install.sh b/src/cli/install.sh
index 096ff7917..9218c51ad 100644
--- a/src/cli/install.sh
+++ b/src/cli/install.sh
@@ -29,7 +29,7 @@ if [[ -t 1 ]]; then
# Bold
Bold_Green='\033[1;32m' # Bold Green
- Bold_White='\033[1m' # Bold White
+ Bold_White='\033[1m' # Bold White
fi
error() {
@@ -79,9 +79,21 @@ if [[ $target = darwin-x64 ]]; then
fi
fi
-
github_repo="https://github.com/oven-sh/bun"
+if [[ $target = darwin-x64 ]]; then
+ # If AVX2 isn't supported, use the -baseline build
+ if [[ $(sysctl -n machdep.cpu.features) != *avx2* ]]; then
+ target=darwin-x64-baseline
+ fi
+fi
+
+if [[ $target = linux-x64 ]]; then
+ # If AVX2 isn't supported, use the -baseline build
+ if [[ $(cat /proc/cpuinfo | grep avx2) = '' ]]; then
+ target=linux-x64-baseline
+ fi
+fi
if [[ $# = 0 ]]; then
bun_uri=$github_repo/releases/latest/download/bun-$target.zip