c2ac03fb9a49d6ae8ed8679efc22b1c874b71cd4
[anna.git] / example / diameter / launcher / deployments / advanced / loadXml.sh
1 #!/bin/bash
2 > curl_log.txt
3 TRACE="--trace-ascii curl_log.txt"
4 SERVER=`cat .httpServer`
5
6 use () {
7
8    echo "Use: $0 <xml_file>"
9    echo
10    echo "Load xml file and show on stdout again."
11    echo "It is useful to test xml loader and xml viewer, but also for show aliases and,"
12    echo "if '--ignoreFlags' commandline option is missing, for flag coherence checking."
13    echo
14    exit
15 }
16
17 echo
18 [[ "$1" = "" ]] && use
19 [[ ! -f "$1" ]] && { echo "ERROR: file '$1' not found" ; echo; echo; exit ; }
20 echo
21 operation="loadxml|$1"
22 curl -m 1 --data "$operation" $TRACE ${SERVER}
23