From: Julien Moutinho Date: Mon, 13 Oct 2014 06:26:24 +0000 (+0200) Subject: Ajout : ./garradin X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/%22%24ccApp/%40%20%27info_desinstaller_plugin%27%20=%3E%20%27%20deactivates%20the%20plugin%20and%20deletes%20the%20data%27%2C%20%27info_discussion_cours%27%20=%3E%20%27Current%20discussions%27%2C%20%27info_ecrire_article%27%20=%3E%20%27Before%20writing%20any%20articles%2C%20you%20must%20create%20at%20least%20one%20section.%27%2C-%27info_email_envoi%27%20=%3E%20%27Sender/%27s%20email%20address%20%28optional%29%27%2C-%27info_email_envoi_txt%27%20=%3E%20%27Enter%20the%20sender/%27s%20email%20address%20used%20for%20sending%20emails%20%28by%20default%2C%20the%20recipient/%27s%20address%20is%20used%20as%20the%20sender/%27s%20address%29%C3%82%C2%A0:%27%2C-%27info_email_webmestre%27%20=%3E%20%27Webmaster/%27s%20email%20address%27%2C%20%27info_email_envoi%27%20=%3E%20%27Sender%C3%A2%C2%80%C2%99s%20email%20address%20%28optional%29%27%2C%20%27info_email_envoi_txt%27%20=%3E%20%27Enter%20the%20sender%C3%A2%C2%80%C2%99s%20email%20address%20used%20for%20sending%20emails%20%28by%20default%2C%20the%20recipient%C3%A2%C2%80%C2%99s%20address%20is%20used%20as%20the%20sender%C3%A2%C2%80%C2%99s%20address%29%C3%82%C2%A0:%27%2C%20%27info_email_webmestre%27%20=%3E%20%27Webmaster%C3%A2%C2%80%C2%99s%20email%20address%27%2C%20%27info_entrer_code_alphabet%27%20=%3E%20%27Enter%20the%20code%20of%20the%20character%20set%20to%20be%20used:%27%2C%20%27info_envoi_email_automatique%27%20=%3E%20%27Automated%20mailing%27%2C%20%27info_envoyer_maintenant%27%20=%3E%20%27Send%20now%27%2C%40%40%20-340%2C8%20%20340%2C8%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;p=garradin.git Ajout : ./garradin --- diff --git a/garradin b/garradin new file mode 100755 index 0000000..95dceba --- /dev/null +++ b/garradin @@ -0,0 +1,110 @@ +#!/bin/sh + +#ROOT=/usr/share/garradin/www +ROOT=${0%/*}/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 < /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 +}