Skip to content

Commit

Permalink
fixed small comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LDannijs committed Nov 27, 2023
1 parent a0bb899 commit 0690c4f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup → setup.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
#!/bin/sh

RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;94m'
YELLOW='\033[0;33m'
NC='\033[0m'

echo -e "${BLUE}Hello! The Device Repository is where we store lora devices. To add a new vendor or devices, some files need to be created. To help you along we've created this setup tool that will create a few template files with the basic information needed. Please fill in the upcoming questions.\n${NC}"
echo -e "${BLUE}Hello! The Device Repository is where we store characteristics and capabilities LoRaWAN devices. To add a new vendor or devices, some files need to be created. To help you along we've created this setup tool that will create a few template files with the basic information needed. Please fill in the upcoming questions.\n${NC}"

sleep 1

Expand All @@ -31,8 +31,11 @@ while true; do
done

while true; do
echo -e "${BLUE}What is the LoRa Alliance issued Vendor ID? (${RED}required${BLUE}):${NC}"
echo -e "${BLUE}What is the LoRa Alliance issued Vendor ID? (${YELLOW}optional${BLUE}):${NC}"
read vendorid
if [ -z "$vendorid" ]; then
break
fi
if [[ $vendorid =~ ^[0-9]+$ ]] && [[ $vendorid -ge 0 && $vendorid -le 1000 ]]; then
if grep -q -w "vendorID: $vendorid" ./vendor/index.yaml; then
echo -e "${RED}This Vendor ID is already in use.\n${NC}"
Expand Down

0 comments on commit 0690c4f

Please sign in to comment.