|
| 1 | +#!/bin/bash |
| 2 | +# |
| 3 | +# check.sh |
| 4 | +# Script to modify RTK_Everywhere.ino to comment out various defines |
| 5 | +# and verify that the code still builds successfully. This script |
| 6 | +# stops execution upon error due to the following command. |
| 7 | +######################################################################## |
| 8 | +set -e |
| 9 | +#set -o verbose |
| 10 | +#set -o xtrace |
| 11 | + |
| 12 | +# Start fresh |
| 13 | +git reset --hard --quiet HEAD |
| 14 | +make |
| 15 | + |
| 16 | +# Bluetooth |
| 17 | +sed -i 's|#define COMPILE_BT|//#define COMPILE_BT|' RTK_Everywhere.ino |
| 18 | +make |
| 19 | +git reset --hard --quiet HEAD |
| 20 | + |
| 21 | +# Network |
| 22 | +sed -i 's|#define COMPILE_WIFI|//#define COMPILE_WIFI|' RTK_Everywhere.ino |
| 23 | +sed -i 's|#define COMPILE_ETHERNET|//#define COMPILE_ETHERNET|' RTK_Everywhere.ino |
| 24 | +sed -i 's|#define COMPILE_CELLULAR|//#define COMPILE_CELLULAR|' RTK_Everywhere.ino |
| 25 | +make |
| 26 | +git reset --hard --quiet HEAD |
| 27 | + |
| 28 | +# Cellular |
| 29 | +sed -i 's|#define COMPILE_CELLULAR|//#define COMPILE_CELLULAR|' RTK_Everywhere.ino |
| 30 | +make |
| 31 | +git reset --hard --quiet HEAD |
| 32 | + |
| 33 | +# Ethernet |
| 34 | +sed -i 's|#define COMPILE_ETHERNET|//#define COMPILE_ETHERNET|' RTK_Everywhere.ino |
| 35 | +make |
| 36 | +git reset --hard --quiet HEAD |
| 37 | + |
| 38 | +# WiFi |
| 39 | +sed -i 's|#define COMPILE_WIFI|//#define COMPILE_WIFI|' RTK_Everywhere.ino |
| 40 | +make |
| 41 | +git reset --hard --quiet HEAD |
| 42 | + |
| 43 | +# Soft AP |
| 44 | +sed -i 's|#define COMPILE_AP|//#define COMPILE_AP|' RTK_Everywhere.ino |
| 45 | +make |
| 46 | +git reset --hard --quiet HEAD |
| 47 | + |
| 48 | +# ESPNOW |
| 49 | +sed -i 's|#define COMPILE_ESPNOW|//#define COMPILE_ESPNOW|' RTK_Everywhere.ino |
| 50 | +make |
| 51 | +git reset --hard --quiet HEAD |
| 52 | + |
| 53 | +# WiFi, SOFT AP, ESPNOW |
| 54 | +sed -i 's|#define COMPILE_WIFI|//#define COMPILE_WIFI|' RTK_Everywhere.ino |
| 55 | +sed -i 's|#define COMPILE_AP|//#define COMPILE_AP|' RTK_Everywhere.ino |
| 56 | +sed -i 's|#define COMPILE_ESPNOW|//#define COMPILE_ESPNOW|' RTK_Everywhere.ino |
| 57 | +make |
| 58 | +git reset --hard --quiet HEAD |
| 59 | + |
| 60 | +# LG290P |
| 61 | +sed -i 's|#define COMPILE_LG290P|//#define COMPILE_LG290P|' RTK_Everywhere.ino |
| 62 | +make |
| 63 | +git reset --hard --quiet HEAD |
| 64 | + |
| 65 | +# MOSAIC X5 |
| 66 | +sed -i 's|#define COMPILE_MOSAICX5|//#define COMPILE_MOSAICX5|' RTK_Everywhere.ino |
| 67 | +make |
| 68 | +git reset --hard --quiet HEAD |
| 69 | + |
| 70 | +# UM980 |
| 71 | +sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino |
| 72 | +make |
| 73 | +git reset --hard --quiet HEAD |
| 74 | + |
| 75 | +# ZED F9P |
| 76 | +sed -i 's|#define COMPILE_ZED|//#define COMPILE_ZED|' RTK_Everywhere.ino |
| 77 | +make |
| 78 | +git reset --hard --quiet HEAD |
| 79 | + |
| 80 | +# GNSS None |
| 81 | +sed -i 's|#define COMPILE_LG290P|//#define COMPILE_LG290P|' RTK_Everywhere.ino |
| 82 | +sed -i 's|#define COMPILE_MOSAICX5|//#define COMPILE_MOSAICX5|' RTK_Everywhere.ino |
| 83 | +sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino |
| 84 | +sed -i 's|#define COMPILE_ZED|//#define COMPILE_ZED|' RTK_Everywhere.ino |
| 85 | +make |
| 86 | +git reset --hard --quiet HEAD |
| 87 | + |
| 88 | +# L-Band |
| 89 | +sed -i 's|#define COMPILE_L_BAND|//#define COMPILE_L_BAND|' RTK_Everywhere.ino |
| 90 | +make |
| 91 | +git reset --hard --quiet HEAD |
| 92 | + |
| 93 | +# IM19_IMU |
| 94 | +sed -i 's|#define COMPILE_IM19_IMU|//#define COMPILE_IM19_IMU|' RTK_Everywhere.ino |
| 95 | +make |
| 96 | +git reset --hard --quiet HEAD |
| 97 | + |
| 98 | +# PointPerfect Library |
| 99 | +sed -i 's|#define COMPILE_POINTPERFECT_LIBRARY|//#define COMPILE_POINTPERFECT_LIBRARY|' RTK_Everywhere.ino |
| 100 | +make |
| 101 | +git reset --hard --quiet HEAD |
| 102 | + |
| 103 | +# BQ40Z50 |
| 104 | +sed -i 's|#define COMPILE_BQ40Z50|//#define COMPILE_BQ40Z50|' RTK_Everywhere.ino |
| 105 | +make |
| 106 | +git reset --hard --quiet HEAD |
| 107 | + |
| 108 | +# MQTT Client |
| 109 | +sed -i 's|#define COMPILE_MQTT_CLIENT|//#define COMPILE_MQTT_CLIENT|' RTK_Everywhere.ino |
| 110 | +make |
| 111 | +git reset --hard --quiet HEAD |
| 112 | + |
| 113 | +# OTA Auto |
| 114 | +sed -i 's|#define COMPILE_OTA_AUTO|//#define COMPILE_OTA_AUTO|' RTK_Everywhere.ino |
| 115 | +make |
| 116 | +git reset --hard --quiet HEAD |
| 117 | + |
| 118 | +# HTTP Client |
| 119 | +sed -i 's|#define COMPILE_HTTP_CLIENT|//#define COMPILE_HTTP_CLIENT|' RTK_Everywhere.ino |
| 120 | +make |
| 121 | +git reset --hard --quiet HEAD |
0 commit comments