Skip to content

Commit c5ce9b1

Browse files
committed
fix code check suggestion
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
1 parent 5fdbb8c commit c5ce9b1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

functions/grott-install.bash

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
install_grott() {
88
# Fail on errors
99
set -e
10-
10+
1111
# Validate install type argument
1212
if [ "$#" -lt 1 ]; then
1313
echo "Error: Please supply install type."
@@ -25,7 +25,8 @@ install_grott() {
2525

2626
if [[ $INSTALL_TYPE == "install" ]]; then
2727
# Get default IPv4 address
28-
local ipAddress="$(ip route get 8.8.8.8 | awk '{print $7}' | xargs)"
28+
local ipAddress
29+
ipAddress="$(ip route get 8.8.8.8 | awk '{print $7}' | xargs)"
2930
if ! [[ "$ipAddress" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
3031
echo "Error: Invalid IP address format: $ipAddress"
3132
exit 1
@@ -129,7 +130,7 @@ download_grott_files() {
129130
)
130131
local GROTT_EXT_PY_FILE="grottext.py"
131132
local file url
132-
133+
133134
# Download Grott main program Python files
134135
for file in "${GROTT_PY_FILES[@]}"; do
135136
url="${GROTT_FILE_URL}/${file}"
@@ -139,7 +140,7 @@ download_grott_files() {
139140
return 1
140141
}
141142
done
142-
143+
143144
# Download Grott extension Python file
144145
file="$GROTT_EXT_PY_FILE"
145146
url="${GROTT_FILE_URL}/examples/Extensions/${file}"

0 commit comments

Comments
 (0)