3 #ROOT=/usr/share/garradin/www
5 #ROOT=~/fossil/garradin/src/www
6 ROUTER
=${ROOT}/_route.php
12 ARGS
=`getopt -o "p:vh" -l "port:,verbose,help" -n "garradin" -- "$@"`
23 # Now go through all the options
37 Usage : $0 [COMMANDE] [PROJET]
39 Où COMMANDE peut être :
41 server [-p|--port PORT]
42 Démarre un serveur web Garradin sur le port spécifié
43 (ou sur le port 8000 par défaut)
46 Idem que 'server' mais démarre ensuite le navigateur web par défaut
47 et connecte automatiquement avec le premier administrateur
50 Si aucune COMMANDE n'est donnée, Garradin utilisera 'ui' par défaut.
52 PROJET est le chemin menant à un projet Garradin précis
53 (fichier .garradin.sqlite). Si aucun projet n'est indiqué, le
54 dernier projet ouvert sera rouvert. Si aucun projet n'a jamais été
55 ouvert un nouveau projet sera créé.
60 Spécifie le port pour le mode ui ou le mode serveur.
63 Affiche les requêtes reçues sur le serveur web.
85 [ "$PROJECT" = "" ] && PROJECT
="1"
87 export GARRADIN_STANDALONE
="$PROJECT"
90 php
-S ${ADDRESS}:${PORT} -t ${ROOT} -d variables_order=EGPCS ${ROUTER} &
92 php
-S ${ADDRESS}:${PORT} -t ${ROOT} -d variables_order=EGPCS ${ROUTER} > /dev
/null
2>&1 &
98 [ "$CMD" = "ui" ] && {
99 URL
="http://${ADDRESS}:${PORT}/"
100 [ "$DISPLAY" != "" ] && {
101 x-www-browser
${URL} &