From 5f3131c799e276e56270b2b2f3546202055a49ac Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 21 Sep 2021 14:45:59 +0300 Subject: [PATCH] Pull request: all: imp install script logs Updates #3579. Squashed commit of the following: commit 0fe83fba34dc633281144ae1a8c3e7782f6995aa Author: Ainar Garipov Date: Tue Sep 21 14:36:04 2021 +0300 all: imp install script logs --- scripts/install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 3fa62cfd..10669511 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -47,7 +47,7 @@ is_little_endian() { # machine. The required software: # # curl -# unzip (macOS) / tar (other unices) +# unzip (macOS) / tar (other unixes) # check_required() { required_darwin="unzip" @@ -426,6 +426,8 @@ download() { then error_exit "cannot download the package from $url into $pkg_name" fi + + log "successfully downloaded $pkg_name" } # Function unpack unpacks the passed archive depending on it's extension. @@ -433,7 +435,7 @@ unpack() { log "unpacking package from $pkg_name into $out_dir" if ! mkdir -p "$out_dir" then - error_exit "cannot create directory at the $out_dir" + error_exit "cannot create directory $out_dir" fi case "$pkg_ext" @@ -449,6 +451,8 @@ unpack() { ;; esac + log "successfully unpacked, contents: $( echo; ls -l -A "$out_dir" )" + rm "$pkg_name" } @@ -507,6 +511,8 @@ install_service() { return 0 fi + log "installation failed, removing $agh_dir" + rm -r "$agh_dir" # Some devices detected to have armv7 CPU face the compatibility