Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pull request: all: imp install script logs
Updates #3579.

Squashed commit of the following:

commit 0fe83fb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Sep 21 14:36:04 2021 +0300

    all: imp install script logs
  • Loading branch information
ainar-g committed Sep 21, 2021
1 parent 1714a98 commit 5f3131c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/install.sh
Expand Up @@ -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"
Expand Down Expand Up @@ -426,14 +426,16 @@ 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.
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"
Expand All @@ -449,6 +451,8 @@ unpack() {
;;
esac

log "successfully unpacked, contents: $( echo; ls -l -A "$out_dir" )"

rm "$pkg_name"
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5f3131c

Please sign in to comment.