Difference between revisions of "OSXgwCommand"

From GeneWeb
Jump to: navigation, search
 
Line 13: Line 13:
  
 
DIR=`dirname $0`/
 
DIR=`dirname $0`/
BASE=`dirname $0`/bases
+
BASE=$DIR/bases
  
 
cd $DIR
 
cd $DIR

Latest revision as of 22:31, 14 October 2015

#!/bin/sh

case "$LANG" in
  de*) LANG=de;;
  es*) LANG=es;;
  fr*) LANG=fr;;
  it*) LANG=it;;
  lv*) LANG=lv;;
  sv*) LANG=sv;;
  *) LANG=en;;
esac

DIR=`dirname $0`/
BASE=$DIR/bases

cd $DIR
DIR=`pwd`
export LANG

killall gwd
killall gwsetup

if [ -f gwsetup.log ]; then
  mv gwsetup.log gwseup.log.old
fi

mkdir -p "$BASE"
cd "$BASE"

if [ -f gwd.log ]; then
  mv gwd.log gwd.log.old
fi

if test "$LANG" = "fr"; then
  echo "Demarrage de gwsetup..."
else
  echo "Starting gwsetup..."
fi
"$DIR/gw/gwsetup" -gd "$DIR/gw" -lang $LANG > gwsetup.log 2>&1 &

if test "$LANG" = "fr"; then
  echo "Demarrage de gwd..."
else
  echo "Starting gwd..."
fi
"$DIR/gw/gwd" -hd "$DIR/gw" > gwd.log 2>&1 &

echo
if test "$LANG" = "fr"; then
  echo "Gardez cette fenetre ouverte tant que"
  echo "vous voulez utiliser GeneWeb dans votre"
  echo "navigateur"
else
  echo "Keep this window open while you"
  echo "are using GeneWeb on your browser"
fi

open "$DIR/START.htm"

cat