#!/bin/sh

# Find the default master
if [ -f lib/pike/master.pike ]; then
  DEFINES="$DEFINES -mlib/pike/master.pike"
else
  # This is used with localinstall
  if [ -f ../pike/src/lib/master.pike ]; then
    DEFINES="$DEFINES -m../pike/src/lib/master.pike"
  fi
fi

# Extra module-path
if [ -d etc/modules ]; then
  DEFINES="$DEFINES -Metc/modules"
fi
 
# Extra include-path
if [ -d etc/include ]; then
  DEFINES="$DEFINES -Ietc/include"
fi
 
# Extra include-path (2)
if [ -d base_server ]; then
  DEFINES="$DEFINES -Ibase_server"
fi
 
if [ -f base_server/roxen.pike ]; then
  exec bin/pike $DEFINES ./bin/install.pike $@
else
  echo You have to cd to the 'roxen/server' directory to run this program.
fi
