File: GeneWeb.command

package info (click to toggle)
geneweb 4.10-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,524 kB
  • ctags: 2,713
  • sloc: ml: 44,386; sh: 1,720; perl: 782; makefile: 579
file content (67 lines) | stat: -rwxr-xr-x 1,207 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/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`/distrib
cd $DIR
DIR=$PWD
export LANG

# echo -n "]2;GeneWeb"
# echo -n "]1;GeneWeb"

pids=""
trap 'kill $pids' 1 2

if [ -f gwsetup.log ]; then
  mv gwsetup.log gwseup.log.old
fi
mkdir -p "$DIR/../../GeneWebBases"
cd "$DIR/../../GeneWebBases"
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 &
pid=$!
sleep 1
if test "`ps $pid | wc -l`" -ne 2; then
  if test "$LANG" = "fr"; then echo Echec; else echo Failed; fi
  cat
  exit 1
fi
pids="$pids $pid"

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

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