plugin: dot_draw: readme: make it clear, that it only opens an IPv4-socket, so a...
[olsrd.git] / doc / getdefines.bash
1 #!/bin/bash
2
3 set -e
4 set -u
5
6 declare -a flags=( ${@} )
7
8
9 declare -i flagscount=${#flags[*]}
10 declare -i i=0
11 declare regex='^[[:space:]]*-D(.+)[[:space:]]*$'
12 declare result=""
13
14 while [[ ${i} -lt ${flagscount} ]]; do
15   if [[ -n "$(echo "${flags[i]}" | grep -E "${regex}")" ]]; then
16     result="${result}$(echo "${flags[i]}" | sed -r "s/${regex}/ \1/g")"
17   fi
18   i+=1
19 done
20
21 echo "${result}"