summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-11-11 13:28:19 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2014-11-11 13:53:37 +0100
commit1548ce76a28326fa36b983f850ef77bace31678d (patch)
treee29d675633f88f5bc02c1764fd0982034b5644a4
parent0d30bbb7b85d758f86baf0490102a051cdc4538d (diff)
downloadalpine-conf-1548ce76a28326fa36b983f850ef77bace31678d.tar.bz2
alpine-conf-1548ce76a28326fa36b983f850ef77bace31678d.tar.xz
update-kernel: run apk add only once
Make the progressbar show up only once instead of 4 times
-rw-r--r--update-kernel.in17
1 files changed, 8 insertions, 9 deletions
diff --git a/update-kernel.in b/update-kernel.in
index 76107ca..1e75074 100644
--- a/update-kernel.in
+++ b/update-kernel.in
@@ -161,29 +161,28 @@ _apk() {
--repositories-file /etc/apk/repositories $*
}
-add_pkgs() {
- _apk add -q --no-scripts $*
-}
-
extra_pkgs() {
local res=$(_apk search -x $1)
if [ "$res" ]; then
- add_pkgs $*
+ echo $*
fi
}
-add_pkgs -U --initdb alpine-base $PACKAGES
+# set up the root and get the APKINDEX for search
+_apk add --quiet --initdb --update-cache
+
if [ "$BUILDDIR" ]; then
mkdir -p $BOOT
make -C "$BUILDDIR" firmware_install install modules_install \
INSTALL_MOD_PATH=$ROOT INSTALL_PATH=$BOOT
else
- add_pkgs "linux-$FLAVOR" linux-firmware
if [ -z "$PACKAGES" ]; then
- extra_pkgs "dahdi-linux-$FLAVOR" dahdi-linux
- extra_pkgs "xtables-addons-$FLAVOR"
+ PACKAGES="$(extra_pkgs "dahdi-linux-$FLAVOR" dahdi-linux)
+ $(extra_pkgs "xtables-addons-$FLAVOR")"
fi
+ PACKAGES="$PACKAGES linux-$FLAVOR linux-firmware"
fi
+_apk add --quiet --no-scripts alpine-base $PACKAGES
KVER_FLAVOR=