-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stack does a deep clone of all submodules when nodejs-exec is used as a dependency, which takes a looong time. now it isn't cloned if it is already installed, and when it is cloned it is only a shallow (must faster) clone.
- Loading branch information
Showing
6 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.stack-work | ||
/dist | ||
/dist | ||
/bin | ||
/node |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p bin | ||
|
||
# adapted from https://apple.stackexchange.com/a/123408/11374 | ||
function version { echo "${@//v}" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } | ||
|
||
NODE_VERSION=`node --version` | ||
|
||
if [ $(version "$NODE_VERSION") -ge $(version "v6.2.1") ]; then | ||
echo "Using existing system node $NODE_VERSION" | ||
cp `which node` node/node | ||
cp `which node` bin/node | ||
else | ||
echo "Building nodejs from source" | ||
# node not available or too old. Build from source. | ||
git submodule update --init --recursive | ||
git clone --depth 1 -b v6.11.3 https://github.com/nodejs/node.git | ||
cd node | ||
./configure --prefix=/tmp | ||
make -j4 | ||
cd .. | ||
cp node/node bin/node | ||
fi |
Submodule node
deleted from
dbce2e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters