diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-01 14:25:53 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-01 14:25:53 +0000 |
commit | 24691ac93ae248e174fde2356d76998add08ec70 (patch) | |
tree | 598ba9e296abec606f2aebf8f35ec5bb57d9657d | |
parent | 64c155141aee8bd5f25cb5f8b89556b394a3a43a (diff) | |
download | alpine-conf-24691ac93ae248e174fde2356d76998add08ec70.tar.bz2 alpine-conf-24691ac93ae248e174fde2356d76998add08ec70.tar.xz |
setup-apkrepos: simplification of apk update error handling
apk update -q will output error if any and be quiet otherwise.
we dont need extra logic to fish out error messages.
-rwxr-xr-x | setup-apkrepos.in | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in index 275734c..6a7a59d 100755 --- a/setup-apkrepos.in +++ b/setup-apkrepos.in @@ -306,12 +306,7 @@ prompt_update_apk() { case "$update_repo_indexes" in [yY]) echo -n "Updating repository indexes... " - local apkupdate_errors=`apk update 2>&1 | grep -E "^(WARNING|ERROR)" | sed -r "s/(WARNING|ERROR)/\n\1/g"` - if [ ${#apkupdate_errors} -gt 0 ]; then - echo "$apkupdate_errors" - else - echo "done." - fi + apk update -q && echo "done." break ;; [nN]) break;; |