+ARVADOS_LOG=${ARVADOS_DIR}/arvados.log
+ARVADOS_CONF=${WB2_DIR}/tools/arvados_config.yml
+VOCABULARY_CONF=${WB2_DIR}/tools/example-vocabulary.json
+
+if [ ! -f "${WB2_DIR}/src/index.tsx" ]; then
+ echo "ERROR: '${WB2_DIR}' isn't workbench2's directory"
+ usage
+fi
+
+if [ ! -f ${ARVADOS_CONF} ]; then
+ echo "ERROR: Arvados config file ${ARVADOS_CONF} not found"
+ exit 1
+fi
+
+if [ -f "${WB2_DIR}/public/config.json" ]; then
+ echo "ERROR: Please move public/config.json file out of the way"
+ exit 1
+fi
+
+if [ ! -d "${ARVADOS_DIR}/.git" ]; then
+ mkdir -p ${ARVADOS_DIR} || exit 1
+ CLEANUP_ARVADOS_DIR=1