summaryrefslogtreecommitdiff
path: root/scripts/build_rootfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build_rootfs.sh')
-rwxr-xr-xscripts/build_rootfs.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/build_rootfs.sh b/scripts/build_rootfs.sh
index ab9a399..10f3a93 100755
--- a/scripts/build_rootfs.sh
+++ b/scripts/build_rootfs.sh
@@ -123,8 +123,11 @@ add_packages() {
done
}
-update_packages() {
+opkg_update() {
$OPKG update
+}
+
+update_packages() {
local upgradable="$($OPKG list-upgradable|grep -e '^.* - .* - .*'|cut -d ' ' -f 1)"
for pkg in $upgradable; do
echo Upgrading $pkg
@@ -147,6 +150,7 @@ if test -n "$metadata"; then
fi
add_files templates/ $dir/templates/
add_packages bin/packages/${arch}/${subarch}
+opkg_update
if test -n "$upgrade"; then
update_packages
fi