From 8c619bcf7f1b4cba7ca7ef53dc89735fbaeb3cd0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Oct 2022 13:38:23 -0400 Subject: [PATCH] Update zigbee2mqtt-install.sh --- setup/zigbee2mqtt-install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 944e2981..a7fe1668 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -86,11 +86,22 @@ apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Setting up Zigbee2MQTT Repository" -sudo git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null +git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null msg_ok "Set up Zigbee2MQTT Repository" +read -r -p "Switch to Edge/dev branch? (y/N) " prompt +if [[ $prompt == "y" ]] +then +DEV="y" +else +DEV="n" +fi + msg_info "Installing Zigbee2MQTT" cd /opt/zigbee2mqtt &>/dev/null +if [[ $DEV == "y" ]]; then +git checkout dev &>/dev/null +fi npm ci &>/dev/null msg_ok "Installed Zigbee2MQTT"