Shellcheck clean up based on comments from @nwinkler
parent
0793eb41a7
commit
992b87b816
|
|
@ -1,11 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
pushd "${BASH_IT}" >/dev/null
|
pushd "${BASH_IT}" >/dev/null || exit 1
|
||||||
|
|
||||||
# TODO: Add debugging output
|
# TODO: Add debugging output
|
||||||
|
|
||||||
if [ "$1" != "false" ] && [ -d "./enabled" ]; then
|
if [ "$1" != "false" ] && [ -d "./enabled" ]; then
|
||||||
for _bash_it_config_file in $(ls ./enabled/*${1}.bash 2>/dev/null); do
|
for _bash_it_config_file in $(sort <(compgen -G "./enabled/*${1}.bash")); do
|
||||||
if [ -e "${_bash_it_config_file}" ]; then
|
if [ -e "${_bash_it_config_file}" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
source $_bash_it_config_file
|
source $_bash_it_config_file
|
||||||
else
|
else
|
||||||
echo "Unable to read ${_bash_it_config_file}" > /dev/stderr
|
echo "Unable to read ${_bash_it_config_file}" > /dev/stderr
|
||||||
|
|
@ -16,8 +17,9 @@ fi
|
||||||
|
|
||||||
if [ ! -z "${2}" ] && [ -d "${2}/enabled" ]; then
|
if [ ! -z "${2}" ] && [ -d "${2}/enabled" ]; then
|
||||||
# TODO: We should warn users they're using legacy enabling
|
# TODO: We should warn users they're using legacy enabling
|
||||||
for _bash_it_config_file in $(ls ./${2}/enabled/*.bash 2>/dev/null); do
|
for _bash_it_config_file in $(sort <(compgen -G "./${2}/enabled/*.bash")); do
|
||||||
if [ -e "$_bash_it_config_file" ]; then
|
if [ -e "$_bash_it_config_file" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
source "$_bash_it_config_file"
|
source "$_bash_it_config_file"
|
||||||
else
|
else
|
||||||
# TODO Display an error?
|
# TODO Display an error?
|
||||||
|
|
@ -27,4 +29,4 @@ if [ ! -z "${2}" ] && [ -d "${2}/enabled" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset _bash_it_config_file
|
unset _bash_it_config_file
|
||||||
popd >/dev/null
|
popd >/dev/null || exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue