summaryrefslogtreecommitdiffhomepage
path: root/once/get_updates.sh
diff options
context:
space:
mode:
Diffstat (limited to 'once/get_updates.sh')
-rwxr-xr-xonce/get_updates.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/once/get_updates.sh b/once/get_updates.sh
index 7e779db..8a8a6fa 100755
--- a/once/get_updates.sh
+++ b/once/get_updates.sh
@@ -10,7 +10,15 @@ mb_script="$0"
mb_success=no
mb_obtain=no
mb_state=true
-mb_dlopt="${1:-}"
+mb_opt="${1:-}"
+
+if [ "${mb_opt}" = '--mpackage' ]; then
+ mb_mpackage="${mb_opt}"
+ mb_dlopt="${2:-}"
+else
+ mb_dlopt="${mb_opt}"
+ mb_mpackage="${2:-}"
+fi
error_msg()
{
@@ -89,7 +97,12 @@ mb_vendor=$(cat /etc/vendor.host)
# obtain list of advertised updates
obtain_remote_file /updates/updates.sha256
-mb_tarballs=$(cut -d' ' -f3 /updates/updates.sha256)
+
+if [ "${mb_mpackage}" = '--mpackage' ]; then
+ mb_tarballs=$(cut -d' ' -f3 /updates/updates.sha256 | grep 'updater.tar.gz' || true)
+else
+ mb_tarballs=$(cut -d' ' -f3 /updates/updates.sha256)
+fi
# simple argument parsing
if [ "${mb_dlopt}" = '--obtain-tarballs' ]; then