FreeCalypso > hg > sms-coding-utils
annotate scripts/sms-deliver-pdu-hdr @ 19:6a1a436747e9
doc/Tool-workflow: document written
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 27 Aug 2023 10:36:24 +0000 |
parents | dc1cc851025c |
children |
rev | line source |
---|---|
13
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #!/bin/sh |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 if [ $# -lt 1 ] |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 then |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 echo "usage: $0 from-number [options]" 1>&2 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 exit 1 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 fi |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 echo "user-addr $1" |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 shift |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 while [ $# != 0 ] |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 do |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 case "$1" in |
17
dc1cc851025c
scripts: add support for new first octet flags
Mychaela Falconia <falcon@freecalypso.org>
parents:
13
diff
changeset
|
15 lp|mms|rp|sr) |
dc1cc851025c
scripts: add support for new first octet flags
Mychaela Falconia <falcon@freecalypso.org>
parents:
13
diff
changeset
|
16 echo "$1" |
dc1cc851025c
scripts: add support for new first octet flags
Mychaela Falconia <falcon@freecalypso.org>
parents:
13
diff
changeset
|
17 shift |
dc1cc851025c
scripts: add support for new first octet flags
Mychaela Falconia <falcon@freecalypso.org>
parents:
13
diff
changeset
|
18 ;; |
13
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 pid|sc-ts) |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 if [ $# -lt 2 ] |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 then |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 echo "error: $1 requires an argument" 1>&2 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 exit 1 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 fi |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 echo "$1 $2" |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 shift |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 shift |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 ;; |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 *) |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 echo "error: invalid option $1" 1>&2 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 exit 1 |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 esac |
b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 done |