tools: Apply ShellCheck to files in the tools directory (#402)

* Add `.shellcheckrc`
* Apply ShellCheck to `tools/check_for_upgrade.sh`
* Apply ShellCheck to `tools/uninstall.sh`
* Apply ShellCheck to `tools/install.sh`

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
This commit is contained in:
Abel Sen
2023-02-22 06:43:37 -06:00
committed by GitHub
parent 1fdb9d035c
commit 8b8a3b31e0
4 changed files with 35 additions and 21 deletions

View File

@@ -18,6 +18,7 @@ function _omb_upgrade_check {
fi
local LAST_EPOCH
# shellcheck disable=SC1090
. ~/.osh-update
if [[ ! $LAST_EPOCH ]]; then
_omb_upgrade_update_timestamp
@@ -34,7 +35,7 @@ function _omb_upgrade_check {
# update ~/.osh-update
_omb_upgrade_update_timestamp
if [[ $DISABLE_UPDATE_PROMPT == true ]] ||
{ read -p '[Oh My Bash] Would you like to check for updates? [Y/n]: ' line &&
{ read -rp '[Oh My Bash] Would you like to check for updates? [Y/n]: ' line &&
[[ $line == Y* || $line == y* || ! $line ]]; }
then
source "$OSH"/tools/upgrade.sh