Skip to content

Commit c6c5b40

Browse files
committed
install modern version of npm
1 parent 7cd5ce6 commit c6c5b40

File tree

5 files changed

+54
-29
lines changed

5 files changed

+54
-29
lines changed

build-vue-app.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ root=$PWD
2020
# no need to export PATH since it is already in the environment: https://unix.stackexchange.com/a/26059/406037
2121
PATH="${root}/node/bin:$PATH"
2222

23+
bash ${root}/utilities/info.sh "npm version is: $(npm --version)"
24+
2325
cd ${root}/vue-app
2426
npm install
2527
npm run build

install.sh

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,6 @@ bash install/jq.sh ${root}
4747

4848
##########################
4949

50-
rm -rf "node"
51-
node_version="v16.4.2"
52-
53-
if [[ ${machine} == 'x86_64' ]]; then
54-
if [[ ${kernel} == 'Darwin'* ]]; then
55-
curl --remote-name "https://nodejs.org/dist/${node_version}/node-${node_version}-darwin-x64.tar.gz"
56-
tar -xf "node-${node_version}-darwin-x64.tar.gz"
57-
rm "node-${node_version}-darwin-x64.tar.gz"
58-
mv "node-${node_version}-darwin-x64" "node"
59-
elif [[ ${kernel} == 'Linux'* ]]; then
60-
curl --remote-name "https://nodejs.org/dist/${node_version}/node-${node_version}-linux-x64.tar.xz"
61-
tar -xf "node-${node_version}-linux-x64.tar.xz"
62-
rm "node-${node_version}-linux-x64.tar.xz"
63-
mv "node-${node_version}-linux-x64" "node"
64-
else
65-
echo 'neither Darwin nor Linux'
66-
exit 1
67-
fi
68-
else
69-
echo 'not x86_64'
70-
exit 1
71-
fi
50+
bash install/node.sh ${root}
51+
7252

install/node.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
set -o errexit
2+
set -o pipefail
3+
set -o nounset
4+
set -o xtrace
5+
PS4='+ (${BASH_SOURCE[0]##*/} @ ${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
6+
7+
root=$1
8+
9+
kernel=$(uname --kernel-name)
10+
machine=$(uname --machine)
11+
12+
bash ${root}/utilities/info.sh "downloading node (and npm)"
13+
14+
rm -rf "${root}/node"
15+
node_version="v16.4.2"
16+
17+
if [[ ${machine} == 'x86_64' ]]; then
18+
if [[ ${kernel} == 'Darwin'* ]]; then
19+
curl --remote-name "https://nodejs.org/dist/${node_version}/node-${node_version}-darwin-x64.tar.gz"
20+
tar -xf "node-${node_version}-darwin-x64.tar.gz"
21+
rm "node-${node_version}-darwin-x64.tar.gz"
22+
mv "node-${node_version}-darwin-x64" "${root}/node"
23+
elif [[ ${kernel} == 'Linux'* ]]; then
24+
curl --remote-name "https://nodejs.org/dist/${node_version}/node-${node_version}-linux-x64.tar.xz"
25+
tar -xf "node-${node_version}-linux-x64.tar.xz"
26+
rm "node-${node_version}-linux-x64.tar.xz"
27+
mv "node-${node_version}-linux-x64" "${root}/node"
28+
else
29+
echo 'neither Darwin nor Linux'
30+
exit 1
31+
fi
32+
else
33+
echo 'not x86_64'
34+
exit 1
35+
fi
36+
37+
# no need to export PATH since it is already in the environment: https://unix.stackexchange.com/a/26059/406037
38+
PATH="${root}/node/bin:$PATH"
39+
40+
bash ${root}/utilities/info.sh "npm version is: $(npm --version)"
41+
42+
43+

tests/model.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/test.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ kmer_size="5"
2828
output="${root}/tests"
2929
mkdir --parents ${output}
3030

31-
# constraint-tools train \
32-
# --genome ${genome} \
33-
# --region ${neutral_region} \
34-
# --mutations ${mutations} \
35-
# --kmer-size ${kmer_size} \
36-
# --output ${output}
31+
constraint-tools train \
32+
--genome ${genome} \
33+
--region ${neutral_region} \
34+
--mutations ${mutations} \
35+
--kmer-size ${kmer_size} \
36+
--output ${output}
3737

3838
model="${output}/model.json"
3939
port="5000"

0 commit comments

Comments
 (0)