refactoring changes from sequpgrade (endReturn, ...) and some modernizations

This commit is contained in:
2023-01-03 15:49:08 +01:00
parent 215135e8aa
commit 3c22d5729f
69 changed files with 553 additions and 654 deletions

View File

@@ -53,7 +53,7 @@ step_1_alias() { echo "status"; }
step_1() {
local lDir="$(pwd)"
local lComp
getComposer || die "No composer installed"
info "Composer found: ${sq_composerBin}"
@@ -62,7 +62,7 @@ step_1() {
info -a "$(update-alternatives --list php)"
}
step_10_info() {
step_10_info() {
echo "Install ${toolName}"
echoinfo " [OPTIONS]"
echoinfo " -l: (default) install composer.phar to the current directory"
@@ -79,7 +79,7 @@ step_10() {
for _ in "${@}" ; do
case "${1:-}" in
-l) shift ;;
-g)
-g)
lLocal=0
lArgs+=(--install-dir="/usr/local/bin")
lArgs+=(--filename="composer")
@@ -92,7 +92,7 @@ step_10() {
local getArg="-l"
(( ! lLocal )) && getArg="-g"
getComposer ${getArg} && die "Composer already installed: ${sq_composerBin}"
[[ -n "${1:-}" ]] && lArgs+=(--version="${1}")
interactive || lArgs+=(--quiet)