FreeCalypso > hg > sms-coding-utils
changeset 13:b8d8f8a3cdb7
scripts: wrappers for network-side SMS-DELIVER PDU generation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 27 Aug 2023 05:11:21 +0000 |
parents | 0fe95ca922c7 |
children | b014abaf0898 |
files | scripts/Makefile scripts/gen-sms-deliver-pdu scripts/sms-deliver-pdu-hdr |
diffstat | 3 files changed, 51 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/Makefile Sun Aug 27 05:11:21 2023 +0000 @@ -0,0 +1,13 @@ +SCRIPTS=gen-sms-deliver-pdu sms-deliver-pdu-hdr + +INSTALL_PREFIX= /opt/freecalypso + +INSTBIN=${INSTALL_PREFIX}/bin + +all: + +install: + mkdir -p ${INSTBIN} + install -c ${SCRIPTS} ${INSTBIN} + +clean:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/gen-sms-deliver-pdu Sun Aug 27 05:11:21 2023 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ $# -lt 1 ] +then + echo "usage: $0 from-number [options]" 1>&2 + exit 1 +fi + +(sms-deliver-pdu-hdr "$@"; cat) | sms-gen-tpdu mt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/sms-deliver-pdu-hdr Sun Aug 27 05:11:21 2023 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +if [ $# -lt 1 ] +then + echo "usage: $0 from-number [options]" 1>&2 + exit 1 +fi + +echo "user-addr $1" +shift + +while [ $# != 0 ] +do + case "$1" in + pid|sc-ts) + if [ $# -lt 2 ] + then + echo "error: $1 requires an argument" 1>&2 + exit 1 + fi + echo "$1 $2" + shift + shift + ;; + *) + echo "error: invalid option $1" 1>&2 + exit 1 + esac +done