#!/bin/bash

if [ "`which getdir`" = "" ];then
  xmessage -title ERROR -center "
  please install the \"getdir\" dotpup first!

  http://dotpups.de/dotpups/System_Utilities/getdir.pup
"
  exit 0
fi

### getdir resolves the real folder of a program, even if it is called by a symlink

BASE=`getdir $0`
cd "$BASE"

### the next step converts ./ to a full path like /root/test

BASE=`pwd`
cd "$BASE"

### run our program
"$BASE/main" 