Skip to content
Snippets Groups Projects
Commit 82621986 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Add more options

parent c4d95aa1
No related branches found
No related tags found
No related merge requests found
......@@ -2,9 +2,21 @@
daq_ligier_ip="192.168.0.110"
daq_ligier_port=5553
monitoring_ligier_ip="127.0.0.1"
monitoring_ligier_port=5553
tmux_session_name="km3mon"
show_km3mon_banner()
{
echo ' _ _ __ __ ___ __ __ _____ _ _ '
echo '( )/ )( \/ )(__ )( \/ )( _ )( \( )'
echo ' ) ( ) ( (_ \ ) ( )(_)( ) ( '
echo '(_)\_)(_/\/\_)(___/(_/\/\_)(_____)(_)\_)'
echo
}
for arg in "$@"; do
case "$arg" in
--daq-ligier-ip=*)
......@@ -15,6 +27,10 @@ for arg in "$@"; do
daq_ligier_port=`echo $arg | sed 's/--daq-ligier-port=//'`
;;
--monitoring-ligier-ip=*)
monitoring_ligier_ip=`echo $arg | sed 's/--monitoring-ligier-ip=//'`
;;
--monitoring-ligier-port=*)
monitoring_ligier_port=`echo $arg | sed 's/--monitoring-ligier-port=//'`
;;
......@@ -24,24 +40,32 @@ for arg in "$@"; do
;;
--help)
echo 'usage: ./configure [options]'
echo 'options:'
echo ' --daq-ligier-ip=<ip>: The IP of the DAQ Ligier [default: ${daq_ligier_ip}].'
echo ' --daq-ligier-port=<port>: The port of the DAQ Ligier [default: ${daq_ligier_port}].'
echo ' --tmux-session-name=<name>: The name of the tmux session [default: ${tmux_session_name}].'
echo 'all invalid options are silently ignored'
show_km3mon_banner
echo 'Usage: ./configure [options]'
echo
echo ' OPTION DESCRIPTION DEFAULT'
echo " --daq-ligier-ip=<ip> The DAQ Ligier ${daq_ligier_ip}"
echo " --daq-ligier-port=<port> The port of the DAQ Ligier ${daq_ligier_port}"
echo " --monitoring-ligier-ip=<ip> The monitoring Ligier ${monitoring_ligier_ip}"
echo " --monitoring-ligier-port=<port> The port of the DAQ Ligier ${monitoring_ligier_port}"
echo " --tmux-session-name=<name> TMUX session name ${tmux_session_name}"
echo
echo 'All invalid options are silently ignored.'
exit 0
;;
esac
done
echo 'Generating makefile...'
echo "DAQ_LIGIER_IP = ${daq_ligier_ip}" > Makefile
echo "DAQ_LIGIER_PORT = ${daq_ligier_port}" >> Makefile
echo "MONITORING_LIGIER_IP = ${monitoring_ligier_ip}" >> Makefile
echo "MONITORING_LIGIER_PORT = ${monitoring_ligier_port}" >> Makefile
echo "SESSION_NAME = ${tmux_session_name}" >> Makefile
cat Makefile.in >> Makefile
echo 'Configuration complete, type "make start" to start the monitoring session.'
show_km3mon_banner
echo "DAQ Ligier: ${daq_ligier_ip}:${daq_ligier_port}"
echo "Monitoring Ligier: ${monitoring_ligier_ip}:${monitoring_ligier_port}"
echo
echo "Configuration complete, type \"make start\" to start the monitoring in a tmux session called \"${tmux_session_name}\"."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment