fix shellcheck's concerns

This commit is contained in:
Rob Walker 2018-06-23 11:52:12 -07:00
parent eb07e4588b
commit e83e898eed
4 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash
here=$(dirname $0)
here=$(dirname "$0")
# shellcheck source=/dev/null
. "${here}"/myip.sh
myip=$(myip) || exit $?

View File

@ -30,7 +30,7 @@ Please choose the IP address you want to advertise to the network:
"
done
while read -p "${prompt}
while read -r -p "${prompt}
please enter a number [0 for default]: " which
do
[[ -z ${which} ]] && break;
@ -46,7 +46,7 @@ please enter a number [0 for default]: " which
}
if [[ ${0} == ${BASH_SOURCE[0]} ]]
if [[ ${0} == "${BASH_SOURCE[0]}" ]]
then
myip "$@"
fi

View File

@ -1,5 +1,7 @@
#!/bin/bash
here=$(dirname $0)
here=$(dirname "$0")
# shellcheck source=/dev/null
. "${here}"/myip.sh
myip=$(myip) || exit $?

View File

@ -1,5 +1,7 @@
#!/bin/bash
here=$(dirname $0)
here=$(dirname "$0")
# shellcheck source=/dev/null
. "${here}"/myip.sh
leader=$1