declare -xp

export PATH="$coreutils/bin"

EXECUTABLE=drawioserver

mkdir $out
mkdir $out/src
mkdir $out/bin

ln -s $commonSrc $out/src/common
ln -s $serverSrc $out/src/server

echo "#!$builder
export NODE_PATH=$NODE_PATH:$node_path
cd $staticWebApp # serve this directory statically
$node/bin/node $out/src/server/run_server.js \$*
" > $out/bin/$EXECUTABLE

chmod +x $out/bin/$EXECUTABLE
