Skip to content

Commit

Permalink
all: imp install script logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Sep 21, 2021
1 parent 1714a98 commit 0fe83fb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
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 0fe83fb

Please sign in to comment.