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 #!/bin/bash
here=$(dirname $0) here=$(dirname "$0")
# shellcheck source=/dev/null
. "${here}"/myip.sh . "${here}"/myip.sh
myip=$(myip) || exit $? myip=$(myip) || exit $?

View File

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

View File

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

View File

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