What happens when you call './do'

do is a bash script, and is therefore at least somewhat readable by humans.

The script starts off by initializing some variables:

Function Definitions

Call main

The main function starts by changing into the directory with a name equivalent to the output of `"$(dirname $0)". If that fails, then the process dies with the argument "failed to set directory".

Next, we create the build directory (if it does not exist). If this fails, the process dies with the error "failed to create build dir ...".

Next, we call getsha256sum. If its output is falsey, then the script dies with the error "couldn't find working sha256 hasher"

Next, we call hasOkNode. If this returns 0, then we call getNode, if this is unsuccessful, then the script dies with the error "could not get working nodejs impl".

Finally, we use the environment variable $NODE to call cjdns/node_build/make.js with the arguments "${@}".