We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ecc2fa8 commit 5583ef1Copy full SHA for 5583ef1
1 file changed
stacks/node/build.sh
@@ -0,0 +1,25 @@
1
+#!/bin/bash
2
+
3
+# Load stack utils
4
+. /usr/bin/stack-utils
5
6
+# Implement build function
7
+function build() {
8
+ generate-stack-path
9
+ case "$OS_ARCH" in
10
+ 'amd64')
11
+ downloadUrl="https://nodejs.org/dist/v${STACK_VERSION}/node-v${STACK_VERSION}-linux-x64.tar.xz";
12
+ ;;
13
+ 'arm64')
14
+ downloadUrl="https://nodejs.org/dist/v${STACK_VERSION}/node-v${STACK_VERSION}-linux-arm64.tar.xz";
15
16
+ *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;;
17
+ esac;
18
+ curl -fsSL -o node.tar.xz "${downloadUrl}"
19
+ tar -xJf node.tar.xz
20
+ cp -rf node-v${STACK_VERSION}-linux-*/* "${DATA_DIR}"
21
+ rm -rf node-v${STACK_VERSION}-linux-* node.tar.xz
22
+}
23
24
+# call build stack
25
+build-stack "${1}"
0 commit comments