2015-06-13 22:58:27 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../nvm.sh
|
2015-06-13 22:58:27 +08:00
|
|
|
|
|
|
|
NVM_TEST_VERSION=v0.10.7
|
|
|
|
|
|
|
|
# Remove the stuff we're clobbering.
|
2016-05-09 13:21:33 +08:00
|
|
|
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
|
2015-06-13 22:58:27 +08:00
|
|
|
|
|
|
|
# Fake ARM arch
|
|
|
|
nvm_get_arch() {
|
|
|
|
echo "armv7l"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Install from source
|
|
|
|
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
|
|
|
|
|
|
|
|
# Check Install
|
2016-05-09 13:21:33 +08:00
|
|
|
[ -d ../../$NVM_TEST_VERSION ]
|
2015-06-14 01:52:54 +08:00
|
|
|
node --version | grep $NVM_TEST_VERSION || "'node --version | grep $NVM_TEST_VERSION' failed"
|
2015-06-13 22:58:27 +08:00
|
|
|
|
|
|
|
# Check V8 snapshot isn't compiled
|
2015-06-14 01:52:54 +08:00
|
|
|
node -p "if(! process.config.variables.v8_use_snapshot) { console.log('no-snapshot'); }" | grep "no-snapshot" || "'node -p \"if(! process.config.variables.v8_use_snapshot) { console.log('no-snapshot'); }\" | grep \"no-snapshot\"' failed"
|