Skip to content

Instantly share code, notes, and snippets.

@hexparrot
Last active December 17, 2015 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hexparrot/112538ee0d7542bf37f6 to your computer and use it in GitHub Desktop.
Save hexparrot/112538ee0d7542bf37f6 to your computer and use it in GitHub Desktop.
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