Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Building node-posix on FreeBSD 9.3
#!/bin/sh
test_command() {
eval $1
RET=$?
echo ""
if [ $RET -eq 0 ]; then
echo "COMMAND OK: $1"
else
echo "COMMAND FAILED: $1"
fi
echo ""
return "$RET"
}
rm -rf ./node_modules
echo "**************"
echo "Attempting just to build posix module..."
test_command "npm install --silent posix" && test_command "node -e \"require('posix')\""
rm -rf ./node_modules
echo "**************"
echo "Attempting to build gmake, then posix module..."
test_command "npm install --silent gmake" && test_command "npm install --silent posix" && test_command "node -e \"require('posix')\""
rm -rf ./node_modules
echo "**************"
echo "Attempting to build gmake with c++, then posix module with c++..."
test_command "CXX=c++ npm install --silent gmake" && test_command "CXX=c++ npm install --silent posix" && test_command "node -e \"require('posix')\""
rm -rf ./node_modules
echo "**************"
echo "Attempting to build gmake with c++, then posix module without c++..."
test_command "CXX=c++ npm install --silent gmake" && test_command "npm install --silent posix" && test_command "node -e \"require('posix')\""
rm -rf ./node_modules
echo "**************"
echo "Attempting to build gmake without c++, then posix module with c++..."
test_command "npm install --silent gmake" && test_command "CXX=c++ npm install --silent posix" && test_command "node -e \"require('posix')\""
rm -rf ./node_modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment