clean up shellcheck notices

closes https://github.com/pkgxdev/pkgx/issues/784
This commit is contained in:
Jacob Heider 2023-10-06 22:57:28 -04:00
parent 174bdc9b22
commit bdc6b23978
No known key found for this signature in database
GPG key ID: 59D15ADC7DCD39BB

View file

@ -7,7 +7,7 @@ find_git_command() {
case $arg in case $arg in
-*);; -*);;
*) *)
echo $arg echo "$arg"
return # found the command! return # found the command!
esac esac
done done
@ -20,12 +20,12 @@ cmd=$(find_git_command "$@")
if [ -z "$cmd" ]; then if [ -z "$cmd" ]; then
exec "$libexec/git" "$@" exec "$libexec/git" "$@"
elif [ -x "$libexec/git-$_CMD" -a -f "$libexec/git-$cmd" ]; then elif [ -x "$libexec/git-$cmd" ] && [ -f "$libexec/git-$cmd" ]; then
exec "$libexec/git" "$@" exec "$libexec/git" "$@"
elif type "git-$cmd" >/dev/null 2>&1; then elif type "git-$cmd" >/dev/null 2>&1; then
exec "$libexec/git" "$@" exec "$libexec/git" "$@"
elif command -v pkgx >/dev/null 2>&1 && pkg=$(pkgx --provider git-$cmd); then elif command -v pkgx >/dev/null 2>&1 && pkg=$(pkgx --provider git-"$cmd"); then
exec pkgx +$pkg "$libexec/git" "$@" exec pkgx +"$pkg" "$libexec/git" "$@"
else else
exec "$libexec/git" "$@" exec "$libexec/git" "$@"
fi fi