You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2018/06/12 19:59:29 UTC
nifi-minifi-cpp git commit: MINIFICPP-529: Introduce bootstrap state
Repository: nifi-minifi-cpp
Updated Branches:
refs/heads/master 7baeb2b6c -> 934183b5d
MINIFICPP-529: Introduce bootstrap state
This closes #354.
Signed-off-by: Aldrin Piri <al...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/934183b5
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/934183b5
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/934183b5
Branch: refs/heads/master
Commit: 934183b5d9b2ed5b30e64840437738ae4f4cc85f
Parents: 7baeb2b
Author: Marc Parisi <ph...@apache.org>
Authored: Wed Jun 6 12:54:15 2018 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Tue Jun 12 15:58:41 2018 -0400
----------------------------------------------------------------------
.gitignore | 1 +
README.md | 3 +
bootstrap.sh | 283 +++++-----------------------------------------
bstrp_functions.sh | 294 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 325 insertions(+), 256 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/934183b5/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index d89d4b6..9968c0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,7 @@ cmake-build-debug
# Generated files
build
+state
bin
target
thirdparty/**/*.o
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/934183b5/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index ec0ec23..f5abefd 100644
--- a/README.md
+++ b/README.md
@@ -329,6 +329,9 @@ $ sudo brew install libpcap
Enter choice [ A - N ]
```
+- Boostrap now saves state between runs. State will automatically be saved. Provide -c or --clear to clear this state. The -i option provides a guided menu install with the ability to change
+advanced features.
+
### Building
- From your source checkout, create a directory to perform the build (e.g. build) and cd into that directory.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/934183b5/bootstrap.sh
----------------------------------------------------------------------
diff --git a/bootstrap.sh b/bootstrap.sh
index b0fecdb..ccfc98a 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -31,6 +31,7 @@ FEATURES_SELECTED="false"
AUTO_REMOVE_EXTENSIONS="true"
export NO_PROMPT="false"
ALL_FEATURES_ENABLED=${FALSE}
+BUILD_DIR="build"
DEPLOY="false"
OPTIONS=()
@@ -41,53 +42,8 @@ DEPLOY_LIMITS=()
DEPENDENCIES=()
-add_option(){
- eval "$1=$2"
- OPTIONS+=("$1")
- CMAKE_OPTIONS_ENABLED+=("$1:$3")
- CMAKE_OPTIONS_DISABLED+=("$1:$4")
-}
-
-add_enabled_option(){
- eval "$1=$2"
- OPTIONS+=("$1")
- CMAKE_OPTIONS_DISABLED+=("$1:$3")
-}
-add_cmake_option(){
- eval "$1=$2"
-}
-
-add_disabled_option(){
- eval "$1=$2"
- OPTIONS+=("$1")
- CMAKE_OPTIONS_ENABLED+=("$1:$3")
- if [ ! -z "$4" ]; then
- CMAKE_MIN_VERSION+=("$1:$4")
- fi
-
- if [ ! -z "$5" ]; then
- if [ "$5" = "true" ]; then
- DEPLOY_LIMITS+=("$1")
- fi
- fi
-}
-
-add_dependency(){
- DEPENDENCIES+=("$1:$2")
-}
+. "${script_directory}/bstrp_functions.sh"
-### parse the command line arguments
-
-
-EnableAllFeatures(){
- for option in "${OPTIONS[@]}" ; do
- feature_status=${!option}
- if [ "$feature_status" = "${FALSE}" ]; then
- ToggleFeature $option
- fi
- # eval "$option=${TRUE}"
- done
-}
MENU="features"
GUIDED_INSTALL=${FALSE}
while :; do
@@ -100,12 +56,18 @@ while :; do
FEATURES_SELECTED="true"
EnableAllFeatures
;;
+ -c|--clear)
+ rm ${script_directory}/state > /dev/null 2>&1
+ ;;
-d|--deploy)
NO_PROMPT="true"
DEPLOY="true"
FEATURES_SELECTED="true"
EnableAllFeatures
;;
+ "--build_dir="* )
+ BUILD_DIR="${1#*=}"
+ ;;
-t|--travis)
NO_PROMPT="true"
FEATURES_SELECTED="true"
@@ -289,234 +251,40 @@ add_dependency BUSTACHE_ENABLED "boost"
add_disabled_option TENSORFLOW_ENABLED ${FALSE} "ENABLE_TENSORFLOW" "2.6" ${TRUE}
add_dependency TENSORFLOW_ENABLED "tensorflow"
+if [ "$GUIDED_INSTALL" == "${TRUE}" ]; then
+ EnableAllFeatures
+ ALL_FEATURES_ENABLED=${TRUE}
+fi
-pause(){
- read -p "Press [Enter] key to continue..." fackEnterKey
-}
-
-can_deploy(){
- for option in "${DEPLOY_LIMITS[@]}" ; do
- OPT=${option%%:*}
- if [ "${OPT}" = "$1" ]; then
- echo "false"
- fi
- done
- echo "true"
-}
-
-ToggleFeature(){
- VARIABLE_VALUE=${!1}
- ALL_FEATURES_ENABLED="Disabled"
- if [ $VARIABLE_VALUE = "Enabled" ]; then
- eval "$1=${FALSE}"
- else
- for option in "${CMAKE_MIN_VERSION[@]}" ; do
- OPT=${option%%:*}
- if [ "$OPT" = "$1" ]; then
- NEEDED_VER=${option#*:}
- NEEDED_MAJOR=`echo $NEEDED_VER | cut -d. -f1`
- NEEDED_MINOR=`echo $NEEDED_VER | cut -d. -f2`
- NEEDED_REVISION=`echo $NEEDED_VERSION | cut -d. -f3`
- if (( NEEDED_MAJOR > CMAKE_MAJOR )); then
- return 1
- fi
-
- if (( NEEDED_MINOR > CMAKE_MINOR )); then
- return 1
- fi
-
- if (( NEEDED_REVISION > CMAKE_REVISION )); then
- return 1
- fi
- fi
- done
- CAN_ENABLE=$(verify_enable $1)
- CAN_DEPLOY=$(can_deploy $1)
- if [ "$CAN_ENABLE" = "true" ]; then
- if [[ "$DEPLOY" = "true" && "$CAN_DEPLOY" = "true" ]] || [[ "$DEPLOY" = "false" ]]; then
- eval "$1=${TRUE}"
- fi
- fi
- fi
-}
-
-
-print_feature_status(){
- feature="$1"
- feature_status=${!1}
- if [ "$feature_status" = "Enabled" ]; then
- echo "Enabled"
- else
- for option in "${CMAKE_MIN_VERSION[@]}" ; do
- OPT=${option%%:*}
- if [ "${OPT}" = "$1" ]; then
- NEEDED_VER=${option#*:}
- NEEDED_MAJOR=`echo $NEEDED_VER | cut -d. -f1`
- NEEDED_MINOR=`echo $NEEDED_VER | cut -d. -f2`
- NEEDED_REVISION=`echo $NEEDED_VERSION | cut -d. -f3`
- if (( NEEDED_MAJOR > CMAKE_MAJOR )); then
- echo -e "${RED}Disabled*${NO_COLOR}"
- return 1
- fi
-
- if (( NEEDED_MINOR > CMAKE_MINOR )); then
- echo -e "${RED}Disabled*${NO_COLOR}"
- return 1
- fi
-
- if (( NEEDED_REVISION > CMAKE_REVISION )); then
- echo -e "${RED}Disabled*${NO_COLOR}"
- return 1
- fi
- fi
- done
- CAN_ENABLE=$(verify_enable $1)
- if [ "$CAN_ENABLE" = "true" ]; then
- echo -e "${RED}Disabled${NO_COLOR}"
- else
- echo -e "${RED}Disabled*${NO_COLOR}"
- fi
-
- fi
-}
-
+BUILD_DIR_D=${BUILD_DIR}
+load_state
+if [ "$BUILD_DIR_D" != "build" ] && [ "$BUILD_DIR_D" != "$BUILD_DIR" ]; then
+ read -p "Build dir will override stored state, $BUILD_DIR. Press any key to continue " overwrite
+ BUILD_DIR=$BUILD_DIR_D
+
+fi
-if [ ! -d "build" ]; then
- mkdir build/
+if [ ! -d "${BUILD_DIR}" ]; then
+ mkdir ${BUILD_DIR}/
else
overwrite="Y"
if [ "$NO_PROMPT" = "false" ] && [ "$FEATURES_SELECTED" = "false" ]; then
- echo "CMAKE Build dir exists, should we overwrite your build directory before we begin?"
+ echo "CMAKE Build dir (${BUILD_DIR}) exists, should we overwrite your build directory before we begin?"
read -p "If you have already bootstrapped, bootstrapping again isn't necessary to run make [ Y/N ] " overwrite
fi
if [ "$overwrite" = "N" ] || [ "$overwrite" = "n" ]; then
echo "Exiting ...."
exit
else
- rm build/CMakeCache.txt > /dev/null 2>&1
+ rm ${BUILD_DIR}/CMakeCache.txt > /dev/null 2>&1
fi
fi
## change to the directory
-
-pushd build
-
-if [ "$GUIDED_INSTALL" == "${TRUE}" ]; then
- EnableAllFeatures
- ALL_FEATURES_ENABLED=${TRUE}
-fi
-
-
-show_main_menu() {
- clear
- echo "****************************************"
- echo " MiNiFi C++ Main Menu."
- echo "****************************************"
- echo "A. Select MiNIFi C++ Features "
- if [ "$ALL_FEATURES_ENABLED" = "${TRUE}" ]; then
- echo " All features enabled ........$(print_feature_status ALL_FEATURES_ENABLED)"
- fi
- echo "B. Select Advanced Features "
- echo "C. Continue with selected options "
- echo -e "Q. Exit\r\n"
-}
-
-read_main_menu_options(){
- local choice
- read -p "Enter choice [ A-C ] " choice
- choice=$(echo ${choice} | tr '[:upper:]' '[:lower:]')
- case $choice in
- a) MENU="features" ;;
- b) MENU="advanced" ;;
- c) FEATURES_SELECTED="true" ;;
- q) exit 0;;
- *) echo -e "${RED}Please enter a valid option...${NO_COLOR}" && sleep 1
- esac
-}
-
-show_advanced_features_menu() {
- clear
- echo "****************************************"
- echo " MiNiFi C++ Advanced Features."
- echo "****************************************"
- echo "A. Portable Build ..............$(print_feature_status PORTABLE_BUILD)"
- echo "B. Build with Debug symbols ....$(print_feature_status DEBUG_SYMBOLS)"
- echo "C. Build RocksDB from source ...$(print_feature_status BUILD_ROCKSDB)"
- echo -e "R. Return to Main Menu\r\n"
-}
-
-read_advanced_menu_options(){
- local choice
- read -p "Enter choice [ A-C ] " choice
- choice=$(echo ${choice} | tr '[:upper:]' '[:lower:]')
- case $choice in
- a) ToggleFeature PORTABLE_BUILD ;;
- b) ToggleFeature DEBUG_SYMBOLS ;;
- c) ToggleFeature BUILD_ROCKSDB ;;
- r) MENU="main" ;;
- *) echo -e "${RED}Please enter a valid option...${NO_COLOR}" && sleep 1
- esac
-}
-
-
-
-show_supported_features() {
- clear
- echo "****************************************"
- echo " Select MiNiFi C++ Features to toggle."
- echo "****************************************"
- echo "A. Persistent Repositories .....$(print_feature_status ROCKSDB_ENABLED)"
- echo "B. Lib Curl Features ...........$(print_feature_status HTTP_CURL_ENABLED)"
- echo "C. Lib Archive Features ........$(print_feature_status LIBARCHIVE_ENABLED)"
- echo "D. Execute Script support ......$(print_feature_status EXECUTE_SCRIPT_ENABLED)"
- echo "E. Expression Language support .$(print_feature_status EXPRESSION_LANGAUGE_ENABLED)"
- echo "F. Kafka support ...............$(print_feature_status KAFKA_ENABLED)"
- echo "G. PCAP support ................$(print_feature_status PCAP_ENABLED)"
- echo "H. USB Camera support ..........$(print_feature_status USB_ENABLED)"
- echo "I. GPS support .................$(print_feature_status GPS_ENABLED)"
- echo "J. TensorFlow Support ..........$(print_feature_status TENSORFLOW_ENABLED)"
- echo "K. Bustache Support ............$(print_feature_status BUSTACHE_ENABLED)"
- echo "L. MQTT Support ................$(print_feature_status MQTT_ENABLED)"
- echo "M. Enable all extensions"
- echo "P. Continue with these options"
- if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
- echo "R. Return to Main Menu"
- fi
- echo "Q. Quit"
- echo "* Extension cannot be installed due to"
- echo -e " version of cmake or other software\r\n"
-}
-
-read_feature_options(){
- local choice
- read -p "Enter choice [ A - N ] " choice
- choice=$(echo ${choice} | tr '[:upper:]' '[:lower:]')
- case $choice in
- a) ToggleFeature ROCKSDB_ENABLED ;;
- b) ToggleFeature HTTP_CURL_ENABLED ;;
- c) ToggleFeature LIBARCHIVE_ENABLED ;;
- d) ToggleFeature EXECUTE_SCRIPT_ENABLED ;;
- e) ToggleFeature EXPRESSION_LANGAUGE_ENABLED ;;
- f) ToggleFeature KAFKA_ENABLED ;;
- g) ToggleFeature PCAP_ENABLED ;;
- h) ToggleFeature USB_ENABLED ;;
- i) ToggleFeature GPS_ENABLED ;;
- j) ToggleFeature TENSORFLOW_ENABLED ;;
- k) ToggleFeature BUSTACHE_ENABLED ;;
- l) ToggleFeature MQTT_ENABLED ;;
- m) EnableAllFeatures ;;
- p) FEATURES_SELECTED="true" ;;
- r) if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
- MENU="main"
- fi
- ;;
- q) exit 0;;
- *) echo -e "${RED}Please enter an option A-L...${NO_COLOR}" && sleep 2
- esac
-}
+pushd ${BUILD_DIR}
while [ ! "$FEATURES_SELECTED" == "true" ]
do
@@ -533,6 +301,7 @@ do
done
### ensure we have all dependencies
+save_state
build_deps
@@ -638,4 +407,6 @@ if [ "$PACKAGE" = "true" ]; then
make package
fi
+
popd
+
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/934183b5/bstrp_functions.sh
----------------------------------------------------------------------
diff --git a/bstrp_functions.sh b/bstrp_functions.sh
new file mode 100755
index 0000000..beb4442
--- /dev/null
+++ b/bstrp_functions.sh
@@ -0,0 +1,294 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+script_directory="$(cd "$(dirname "$0")" && pwd)"
+
+add_option(){
+ eval "$1=$2"
+ OPTIONS+=("$1")
+ CMAKE_OPTIONS_ENABLED+=("$1:$3")
+ CMAKE_OPTIONS_DISABLED+=("$1:$4")
+}
+
+add_enabled_option(){
+ eval "$1=$2"
+ OPTIONS+=("$1")
+ CMAKE_OPTIONS_DISABLED+=("$1:$3")
+}
+add_cmake_option(){
+ eval "$1=$2"
+}
+
+add_disabled_option(){
+ eval "$1=$2"
+ OPTIONS+=("$1")
+ CMAKE_OPTIONS_ENABLED+=("$1:$3")
+ if [ ! -z "$4" ]; then
+ CMAKE_MIN_VERSION+=("$1:$4")
+ fi
+
+ if [ ! -z "$5" ]; then
+ if [ "$5" = "true" ]; then
+ DEPLOY_LIMITS+=("$1")
+ fi
+ fi
+}
+
+add_dependency(){
+ DEPENDENCIES+=("$1:$2")
+}
+
+### parse the command line arguments
+
+
+EnableAllFeatures(){
+ for option in "${OPTIONS[@]}" ; do
+ feature_status=${!option}
+ if [ "$feature_status" = "${FALSE}" ]; then
+ ToggleFeature $option
+ fi
+ # eval "$option=${TRUE}"
+ done
+}
+
+pause(){
+ read -p "Press [Enter] key to continue..." fackEnterKey
+}
+
+
+load_state(){
+if [ -f ${script_directory}/state ]; then
+ . ${script_directory}/state
+ for option in "${OPTIONS[@]}" ; do
+ option_value="${!option}"
+ if [ "${option_value}" = "${FALSE}" ]; then
+ ALL_FEATURES_ENABLED=${FALSE}
+ fi
+ done
+fi
+}
+
+echo_state_variable(){
+VARIABLE_VALUE=${!1}
+echo "$1=\"${VARIABLE_VALUE}\"" >> ${script_directory}/state
+}
+
+save_state(){
+ echo "VERSION=1" > ${script_directory}/state
+ echo_state_variable BUILD_IDENTIFIER
+ echo_state_variable BUILD_DIR
+ for option in "${OPTIONS[@]}" ; do
+ echo_state_variable $option
+ done
+}
+
+can_deploy(){
+ for option in "${DEPLOY_LIMITS[@]}" ; do
+ OPT=${option%%:*}
+ if [ "${OPT}" = "$1" ]; then
+ echo "false"
+ fi
+ done
+ echo "true"
+}
+
+ToggleFeature(){
+ VARIABLE_VALUE=${!1}
+ ALL_FEATURES_ENABLED="Disabled"
+ if [ $VARIABLE_VALUE = "Enabled" ]; then
+ eval "$1=${FALSE}"
+ else
+ for option in "${CMAKE_MIN_VERSION[@]}" ; do
+ OPT=${option%%:*}
+ if [ "$OPT" = "$1" ]; then
+ NEEDED_VER=${option#*:}
+ NEEDED_MAJOR=`echo $NEEDED_VER | cut -d. -f1`
+ NEEDED_MINOR=`echo $NEEDED_VER | cut -d. -f2`
+ NEEDED_REVISION=`echo $NEEDED_VERSION | cut -d. -f3`
+ if (( NEEDED_MAJOR > CMAKE_MAJOR )); then
+ return 1
+ fi
+
+ if (( NEEDED_MINOR > CMAKE_MINOR )); then
+ return 1
+ fi
+
+ if (( NEEDED_REVISION > CMAKE_REVISION )); then
+ return 1
+ fi
+ fi
+ done
+ CAN_ENABLE=$(verify_enable $1)
+ CAN_DEPLOY=$(can_deploy $1)
+ if [ "$CAN_ENABLE" = "true" ]; then
+ if [[ "$DEPLOY" = "true" && "$CAN_DEPLOY" = "true" ]] || [[ "$DEPLOY" = "false" ]]; then
+ eval "$1=${TRUE}"
+ fi
+ fi
+ fi
+}
+
+
+print_feature_status(){
+ feature="$1"
+ feature_status=${!1}
+ if [ "$feature_status" = "Enabled" ]; then
+ echo "Enabled"
+ else
+ for option in "${CMAKE_MIN_VERSION[@]}" ; do
+ OPT=${option%%:*}
+ if [ "${OPT}" = "$1" ]; then
+ NEEDED_VER=${option#*:}
+ NEEDED_MAJOR=`echo $NEEDED_VER | cut -d. -f1`
+ NEEDED_MINOR=`echo $NEEDED_VER | cut -d. -f2`
+ NEEDED_REVISION=`echo $NEEDED_VERSION | cut -d. -f3`
+ if (( NEEDED_MAJOR > CMAKE_MAJOR )); then
+ echo -e "${RED}Disabled*${NO_COLOR}"
+ return 1
+ fi
+
+ if (( NEEDED_MINOR > CMAKE_MINOR )); then
+ echo -e "${RED}Disabled*${NO_COLOR}"
+ return 1
+ fi
+
+ if (( NEEDED_REVISION > CMAKE_REVISION )); then
+ echo -e "${RED}Disabled*${NO_COLOR}"
+ return 1
+ fi
+ fi
+ done
+ CAN_ENABLE=$(verify_enable $1)
+ if [ "$CAN_ENABLE" = "true" ]; then
+ echo -e "${RED}Disabled${NO_COLOR}"
+ else
+ echo -e "${RED}Disabled*${NO_COLOR}"
+ fi
+
+ fi
+}
+
+
+show_main_menu() {
+ clear
+ echo "****************************************"
+ echo " MiNiFi C++ Main Menu."
+ echo "****************************************"
+ echo "A. Select MiNIFi C++ Features "
+ if [ "$ALL_FEATURES_ENABLED" = "${TRUE}" ]; then
+ echo " All features enabled ........$(print_feature_status ALL_FEATURES_ENABLED)"
+ fi
+ echo "B. Select Advanced Features "
+ echo "C. Continue with selected options "
+ echo -e "Q. Exit\r\n"
+}
+
+read_main_menu_options(){
+ local choice
+ read -p "Enter choice [ A-C ] " choice
+ choice=$(echo ${choice} | tr '[:upper:]' '[:lower:]')
+ case $choice in
+ a) MENU="features" ;;
+ b) MENU="advanced" ;;
+ c) FEATURES_SELECTED="true" ;;
+ q) exit 0;;
+ *) echo -e "${RED}Please enter a valid option...${NO_COLOR}" && sleep 1
+ esac
+}
+
+show_advanced_features_menu() {
+ clear
+ echo "****************************************"
+ echo " MiNiFi C++ Advanced Features."
+ echo "****************************************"
+ echo "A. Portable Build ..............$(print_feature_status PORTABLE_BUILD)"
+ echo "B. Build with Debug symbols ....$(print_feature_status DEBUG_SYMBOLS)"
+ echo "C. Build RocksDB from source ...$(print_feature_status BUILD_ROCKSDB)"
+ echo -e "R. Return to Main Menu\r\n"
+}
+
+read_advanced_menu_options(){
+ local choice
+ read -p "Enter choice [ A-C ] " choice
+ choice=$(echo ${choice} | tr '[:upper:]' '[:lower:]')
+ case $choice in
+ a) ToggleFeature PORTABLE_BUILD ;;
+ b) ToggleFeature DEBUG_SYMBOLS ;;
+ c) ToggleFeature BUILD_ROCKSDB ;;
+ r) MENU="main" ;;
+ *) echo -e "${RED}Please enter a valid option...${NO_COLOR}" && sleep 1
+ esac
+}
+
+
+
+show_supported_features() {
+ clear
+ echo "****************************************"
+ echo " Select MiNiFi C++ Features to toggle."
+ echo "****************************************"
+ echo "A. Persistent Repositories .....$(print_feature_status ROCKSDB_ENABLED)"
+ echo "B. Lib Curl Features ...........$(print_feature_status HTTP_CURL_ENABLED)"
+ echo "C. Lib Archive Features ........$(print_feature_status LIBARCHIVE_ENABLED)"
+ echo "D. Execute Script support ......$(print_feature_status EXECUTE_SCRIPT_ENABLED)"
+ echo "E. Expression Language support .$(print_feature_status EXPRESSION_LANGAUGE_ENABLED)"
+ echo "F. Kafka support ...............$(print_feature_status KAFKA_ENABLED)"
+ echo "G. PCAP support ................$(print_feature_status PCAP_ENABLED)"
+ echo "H. USB Camera support ..........$(print_feature_status USB_ENABLED)"
+ echo "I. GPS support .................$(print_feature_status GPS_ENABLED)"
+ echo "J. TensorFlow Support ..........$(print_feature_status TENSORFLOW_ENABLED)"
+ echo "K. Bustache Support ............$(print_feature_status BUSTACHE_ENABLED)"
+ echo "L. MQTT Support ................$(print_feature_status MQTT_ENABLED)"
+ echo "M. Enable all extensions"
+ echo "P. Continue with these options"
+ if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
+ echo "R. Return to Main Menu"
+ fi
+ echo "Q. Quit"
+ echo "* Extension cannot be installed due to"
+ echo -e " version of cmake or other software\r\n"
+}
+
+read_feature_options(){
+ local choice
+ read -p "Enter choice [ A - N ] " choice
+ choice=$(echo ${choice} | tr '[:upper:]' '[:lower:]')
+ case $choice in
+ a) ToggleFeature ROCKSDB_ENABLED ;;
+ b) ToggleFeature HTTP_CURL_ENABLED ;;
+ c) ToggleFeature LIBARCHIVE_ENABLED ;;
+ d) ToggleFeature EXECUTE_SCRIPT_ENABLED ;;
+ e) ToggleFeature EXPRESSION_LANGAUGE_ENABLED ;;
+ f) ToggleFeature KAFKA_ENABLED ;;
+ g) ToggleFeature PCAP_ENABLED ;;
+ h) ToggleFeature USB_ENABLED ;;
+ i) ToggleFeature GPS_ENABLED ;;
+ j) ToggleFeature TENSORFLOW_ENABLED ;;
+ k) ToggleFeature BUSTACHE_ENABLED ;;
+ l) ToggleFeature MQTT_ENABLED ;;
+ m) EnableAllFeatures ;;
+ p) FEATURES_SELECTED="true" ;;
+ r) if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
+ MENU="main"
+ fi
+ ;;
+ q) exit 0;;
+ *) echo -e "${RED}Please enter an option A-L...${NO_COLOR}" && sleep 2
+ esac
+}
+