Overview
Comment: | Mise à jour script debian en bash plutôt qu'en PHP |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
7a2f564518a50e752c4e9ef710aa929c |
User & Date: | bohwaz on 2014-01-08 16:32:50 |
Other Links: | manifest | tags |
Context
2014-01-08
| ||
17:21 | Mise à jour manpage check-in: 6f04a43a5d user: bohwaz tags: trunk | |
16:32 | Mise à jour script debian en bash plutôt qu'en PHP check-in: 7a2f564518 user: bohwaz tags: trunk | |
2013-12-19
| ||
03:27 | Date un poil plus lisible + nom en français + message informant de la création d'une sauvegarde check-in: c87e9ecc9e user: bohwaz tags: trunk | |
Changes
Modified debian/garradin from [1ece109feb] to [08944ac4a2].
|
| | < < < < < < < < < < < | < | > > > | | < | | | < < < | < | < < > > > | | | | | < > > | < | | > | < | | < < | < | < < | < < < < < < | | | | | | | | | | | | | | | | < > > | > > > > > | > > | > > > > > > > > > > > > > > > > > > > > > > > > > | 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | #!/bin/sh ROOT=/usr/share/garradin/www ROOT=~/fossil/garradin/src/www ROUTER=${ROOT}/_route.php PORT=8088 ADDRESS=localhost VERBOSE=0 # Execute getopt ARGS=`getopt -o "p:vh" -l "port:,verbose,help" -n "garradin" -- "$@"` # Bad arguments if [ $? -ne 0 ]; then exit 1 fi # A little magic eval set -- "$ARGS" # Now go through all the options while true; do case "$1" in -p|--port) PORT=$2 shift;; -v|--verbose) VERBOSE=1 shift;; -h|--help) cat <<EOF Usage : $0 [COMMANDE] [PROJET] Où COMMANDE peut être : server [-p|--port PORT] Démarre un serveur web Garradin sur le port spécifié (ou sur le port 8000 par défaut) ui [-p|--port PORT] Idem que 'server' mais démarre ensuite le navigateur web par défaut et connecte automatiquement avec le premier administrateur de l'association. Si aucune COMMANDE n'est donnée, Garradin utilisera 'ui' par défaut. PROJET est le chemin menant à un projet Garradin précis (fichier .garradin.sqlite). Si aucun projet n'est indiqué, le dernier projet ouvert sera rouvert. Si aucun projet n'a jamais été ouvert un nouveau projet sera créé. Options : -p|--port PORT Spécifie le port pour le mode ui ou le mode serveur. -v|--verbose Affiche les requêtes reçues sur le serveur web. -h|--help Affiche ce message. EOF exit shift;; --) shift break;; esac done CMD=$1 [ $VERBOSE = 1 ] && { php -S ${ADDRESS}:${PORT} -t ${ROOT} -d variables_order=EGPCS ${ROUTER} & } || { php -S ${ADDRESS}:${PORT} -t ${ROOT} -d variables_order=EGPCS ${ROUTER} > /dev/null 2>&1 & } php_pid=$! sleep .5 [ $CMD = "ui" ] && { URL="http://${ADDRESS}:${PORT}/" [ "$DISPLAY" != "" ] && { x-www-browser ${URL} & } || { www-browser ${URL} & } wait $! kill $php_pid } || { wait $php_pid } |