9ca200ccb88f3bf4830f4560b921ceca9b7a40e7
[anna.git] / example / diameter / launcher / deployments / advanced / code.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 "Creates '<xml_file>.hex' with encoded result."
11    echo
12    exit
13 }
14
15 echo
16 [[ "$1" = "" ]] && use
17 [[ ! -f "$1" ]] && { echo "ERROR: file '$1' not found" ; echo; echo; exit ; }
18 echo
19 operation="code|$1|${1}.hex"
20 curl -m 1 --data "$operation" $TRACE ${SERVER}
21