#!/bin/bash
mkdir -p $GVM_ROOT/logs > /dev/null 2>&1
mkdir -p $GVM_ROOT/gos > /dev/null 2>&1
mkdir -p $GVM_ROOT/archive > /dev/null 2>&1
mkdir -p $GVM_ROOT/archive/package > /dev/null 2>&1

if [ -z `which hg` ]; then
  echo '* Could not find mercurial (try `sudo apt-get install mercurial`)'
  exit 1
fi

if [ -z `which ar` ]; then
  echo '* Could not find binutils (try `sudo apt-get install binutils (or binutils-multiarch)`)'
  exit 1
fi

if [ -z `which bison` ]; then
  echo '* Could not find bison (try `sudo apt-get install bison`)'
  exit 1
fi

if [ -z `which gcc` ]; then
  echo '* Could not find gcc (try `sudo apt-get install gcc`)'
  exit 1
fi

if [ -z `which make` ]; then
  echo '* Could not find make (try `sudo apt-get install make`)'
  exit 1
fi
