Annotation of mqtt/src/compile.sh, revision 1.1.1.1.2.2

1.1       misho       1: #!/bin/sh
                      2: #
1.1.1.1.2.2! misho       3: # $Id: compile.sh,v 1.1.1.1.2.1 2011/11/28 22:28:08 misho Exp $
1.1       misho       4: #
                      5: 
                      6: /bin/cat >compile.c <<__END
                      7: /*
                      8: The ELWIX and AITNET software is distributed under the following
                      9: terms:
                     10: 
                     11: All of the documentation and software included in the ELWIX and AITNET
                     12: Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
                     13: 
                     14: Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
                     15:        by Michael Pounov <misho@elwix.org>.  All rights reserved.
                     16: 
                     17: Redistribution and use in source and binary forms, with or without
                     18: modification, are permitted provided that the following conditions
                     19: are met:
                     20: 1. Redistributions of source code must retain the above copyright
                     21:    notice, this list of conditions and the following disclaimer.
                     22: 2. Redistributions in binary form must reproduce the above copyright
                     23:    notice, this list of conditions and the following disclaimer in the
                     24:    documentation and/or other materials provided with the distribution.
                     25: 3. All advertising materials mentioning features or use of this software
                     26:    must display the following acknowledgement:
                     27: This product includes software developed by Michael Pounov <misho@elwix.org>
                     28: ELWIX - Embedded LightWeight unIX and its contributors.
                     29: 4. Neither the name of AITNET nor the names of its contributors
                     30:    may be used to endorse or promote products derived from this software
                     31:    without specific prior written permission.
                     32: 
                     33: THIS SOFTWARE IS PROVIDED BY AITNET AND CONTRIBUTORS ``AS IS'' AND
                     34: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     35: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     36: ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     37: FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     38: DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     39: OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     40: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     41: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     42: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     43: SUCH DAMAGE.
                     44: */
1.1.1.1.2.2! misho      45: #include "global.h"
1.1       misho      46: 
                     47: char compiled[] = "`/bin/date +"%Y-%m-%d %H:%M"`";
                     48: char compiledby[] = "`/usr/bin/whoami`";
                     49: char compilehost[] = "`uname -n`";
1.1.1.1.2.2! misho      50: 
        !            51: char cliCmd[] = {
        !            52:                        MQTT_TYPE_CONNECT, MQTT_TYPE_PUBLISH, 
        !            53:                        MQTT_TYPE_SUBSCRIBE, MQTT_TYPE_UNSUBSCRIBE, 
        !            54:                        MQTT_TYPE_PINGREQ, MQTT_TYPE_DISCONNECT, 
        !            55:                        MQTT_TYPE_UNKNOWN
        !            56:                };
        !            57: char *cliStr[] = {
        !            58:                        "CONNECT", "PUBLISH", 
        !            59:                        "SUBSCRIBE", "UNSUBSCRIBE", 
        !            60:                        "PINGREQ", "DISCONNECT",
        !            61:                        "UNKNOWN"
        !            62:                };
        !            63: char srvCmd[] = {
        !            64:                        MQTT_TYPE_CONNACK, MQTT_TYPE_PUBACK, MQTT_TYPE_PUBREC, 
        !            65:                        MQTT_TYPE_PUBREL, MQTT_TYPE_PUBCOMP, MQTT_TYPE_SUBACK, 
        !            66:                        MQTT_TYPE_UNSUBACK, MQTT_TYPE_PINGRESP, MQTT_TYPE_UNKNOWN
        !            67:                };
        !            68: char *srvStr[] = {
        !            69:                        "CONNACK", "PUBACK", "PUBREC", 
        !            70:                        "PUBREL", "PUBCOMP", "SUBACK", 
        !            71:                        "UNSUBACK", "PINGRESP", "UNKNOWN"
        !            72:                };
1.1       misho      73: __END
1.1.1.1.2.1  misho      74: 
                     75: /bin/cat >acc_schema.c <<__END
                     76: /*
                     77: The ELWIX and AITNET software is distributed under the following
                     78: terms:
                     79: 
                     80: All of the documentation and software included in the ELWIX and AITNET
                     81: Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
                     82: 
                     83: Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
                     84:        by Michael Pounov <misho@elwix.org>.  All rights reserved.
                     85: 
                     86: Redistribution and use in source and binary forms, with or without
                     87: modification, are permitted provided that the following conditions
                     88: are met:
                     89: 1. Redistributions of source code must retain the above copyright
                     90:    notice, this list of conditions and the following disclaimer.
                     91: 2. Redistributions in binary form must reproduce the above copyright
                     92:    notice, this list of conditions and the following disclaimer in the
                     93:    documentation and/or other materials provided with the distribution.
                     94: 3. All advertising materials mentioning features or use of this software
                     95:    must display the following acknowledgement:
                     96: This product includes software developed by Michael Pounov <misho@elwix.org>
                     97: ELWIX - Embedded LightWeight unIX and its contributors.
                     98: 4. Neither the name of AITNET nor the names of its contributors
                     99:    may be used to endorse or promote products derived from this software
                    100:    without specific prior written permission.
                    101: 
                    102: THIS SOFTWARE IS PROVIDED BY AITNET AND CONTRIBUTORS ``AS IS'' AND
                    103: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                    104: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                    105: ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                    106: FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                    107: DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                    108: OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                    109: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                    110: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                    111: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                    112: SUCH DAMAGE.
                    113: */
                    114: 
                    115: char sql_schema[] = 
                    116: __END
                    117: while read LINE; do
                    118:        echo \"$LINE \" >>acc_schema.c;
                    119: done <../etc/mqtt_acc.sql
                    120: echo ";" >>acc_schema.c
                    121: 
                    122: /bin/cat >pub_schema.c <<__END
                    123: /*
                    124: The ELWIX and AITNET software is distributed under the following
                    125: terms:
                    126: 
                    127: All of the documentation and software included in the ELWIX and AITNET
                    128: Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
                    129: 
                    130: Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
                    131:        by Michael Pounov <misho@elwix.org>.  All rights reserved.
                    132: 
                    133: Redistribution and use in source and binary forms, with or without
                    134: modification, are permitted provided that the following conditions
                    135: are met:
                    136: 1. Redistributions of source code must retain the above copyright
                    137:    notice, this list of conditions and the following disclaimer.
                    138: 2. Redistributions in binary form must reproduce the above copyright
                    139:    notice, this list of conditions and the following disclaimer in the
                    140:    documentation and/or other materials provided with the distribution.
                    141: 3. All advertising materials mentioning features or use of this software
                    142:    must display the following acknowledgement:
                    143: This product includes software developed by Michael Pounov <misho@elwix.org>
                    144: ELWIX - Embedded LightWeight unIX and its contributors.
                    145: 4. Neither the name of AITNET nor the names of its contributors
                    146:    may be used to endorse or promote products derived from this software
                    147:    without specific prior written permission.
                    148: 
                    149: THIS SOFTWARE IS PROVIDED BY AITNET AND CONTRIBUTORS ``AS IS'' AND
                    150: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                    151: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                    152: ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                    153: FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                    154: DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                    155: OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                    156: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                    157: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                    158: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                    159: SUCH DAMAGE.
                    160: */
                    161: 
                    162: char sql_schema[] = 
                    163: __END
                    164: while read LINE; do
                    165:        echo \"$LINE \" >>pub_schema.c;
                    166: done <../etc/mqtt_pub.sql
                    167: echo ";" >>pub_schema.c

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>