Skip to content

Add cases for armv7 architectures #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,19 @@ construct_configure_options() {


os_based_configure_options() {
local operating_system=$(uname -a)
local operating_system=$(uname -m)
local configure_options=""

if [[ "$operating_system" =~ "x86_64" ]]; then
case "$operating_system" in
x86_64)
local cpu_type="x64"
else
;;
armv7l)
local cpu_type="armv7l"
;;
*)
local cpu_type="x86"
fi
esac

configure_options="$configure_options --dest-cpu=$cpu_type"
echo $configure_options
Expand All @@ -91,11 +96,16 @@ get_download_file_path() {


if [ "$install_type" = "version" ]; then
if [[ "$operating_system" =~ "x86_64" ]]; then
case "$operating_system" in
*"x86_64"*)
local cpu_type="x64"
else
;;
*"armv7l"*)
local cpu_type="armv7l"
;;
*)
local cpu_type="x86"
fi
esac

if [[ "$operating_system" =~ "Darwin" ]]; then
local pkg_name="node-v${version}-darwin-${cpu_type}"
Expand All @@ -116,11 +126,16 @@ get_download_url() {
local operating_system=$(uname -a)

if [ "$install_type" = "version" ]; then
if [[ "$operating_system" =~ "x86_64" ]]; then
case "$operating_system" in
*"x86_64"*)
local cpu_type="x64"
else
;;
*"armv7l"*)
local cpu_type="armv7l"
;;
*)
local cpu_type="x86"
fi
esac

if [[ "$operating_system" =~ "Darwin" ]]; then
echo "http://nodejs.org/dist/v${version}/node-v${version}-darwin-${cpu_type}.tar.gz"
Expand Down