mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 23:38:15 +01:00
PkgInstaller bug, reformatted
This commit is contained in:
parent
8dd1bba75b
commit
778df1de3c
1 changed files with 8 additions and 4 deletions
12
dockcheck.sh
12
dockcheck.sh
|
|
@ -269,12 +269,16 @@ dependency_check() {
|
|||
[[ "$GetBin" =~ [yY] ]] && distro_checker
|
||||
if [[ -n "${PkgInstaller:-}" && "${PkgInstaller:-}" != "ERROR" ]]; then
|
||||
[[ $(uname -s) == "Darwin" && "$AppName" == "regctl" ]] && AppName="regclient"
|
||||
("$PkgInstaller" "$AppName"); PkgExitcode="$?" && AppName="$1"
|
||||
if [[ "$PkgExitcode" == 0 ]]; then { export "$AppVar"="$AppName" && printf "\n%b%b installed.%b\n" "$c_green" "$AppName" "$c_reset"; }
|
||||
else printf "\n%bPackagemanager install failed%b, falling back to static binary.\n" "$c_yellow" "$c_reset"
|
||||
if $PkgInstaller "$AppName"; then
|
||||
AppName="$1"
|
||||
export "$AppVar"="$AppName"
|
||||
printf "\n%b%b installed.%b\n" "$c_green" "$AppName" "$c_reset"
|
||||
else
|
||||
PkgExitcode="ERROR"
|
||||
printf "\n%bPackagemanager install failed%b, falling back to static binary.\n" "$c_yellow" "$c_reset"
|
||||
fi
|
||||
fi
|
||||
if [[ "$GetBin" =~ [sS] || "$PkgInstaller" == "ERROR" || "$PkgExitcode" != 0 ]]; then
|
||||
if [[ "$GetBin" =~ [sS] || "$PkgInstaller" == "ERROR" ]]; then
|
||||
binary_downloader "$AppName" "$AppUrl"
|
||||
[[ -f "$ScriptWorkDir/$AppName" ]] && { export "$AppVar"="$ScriptWorkDir/$1" && printf "\n%b%b downloaded.%b\n" "$c_green" "$AppName" "$c_reset"; }
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue