runit.sh 634 Bytes
Newer Older
1
#!/bin/sh
Bruno Coudoin's avatar
Bruno Coudoin committed
2
set -x
3 4 5 6 7 8 9 10
if [ -z $1 ]; then
  echo "Usage: runit.sh [GCompris activity directory]"
  exit 1
fi

path=`dirname $0`
. $1/init_path.sh

11 12 13
menudir=$path
localedir=$path/locale

14 15 16 17 18 19 20 21 22
if [ ! -f $localedir ]; then
  localedir=/usr/share/locale
fi

if [ ! -d $plugindir ]; then
  plugindir=$path
fi

gcompris=$1/gcompris.bin
23 24 25
if [ ! -f $gcompris ]; then
  gcompris=$1/bin/gcompris
fi
26 27 28 29 30 31 32
if [ ! -f $gcompris ]; then
  gcompris=$1/../gcompris/gcompris
fi

$gcompris -L $plugindir \
    -P $pythonplugindir \
    -A $resourcedir \
33
    -S $menudir/../../boards/skins \
34 35
    -M $menudir \
    --locale_dir=$path/locale \
36
    -l $section/$activity $*
37