diff options
-rwxr-xr-x | once/get_updates.sh | 17 | ||||
-rwxr-xr-x | once/update.sh | 5 |
2 files changed, 19 insertions, 3 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 diff --git a/once/update.sh b/once/update.sh index d93a461..04b274a 100755 --- a/once/update.sh +++ b/once/update.sh @@ -31,7 +31,10 @@ for tarball in $tarballs; do echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo extracting files from /updates/$tarball echo .................................................. - tar -xpvf /updates/$tarball -C "$SYSROOT" || exit 2 + + if [ "$tarball" != 'updater.tar.gz' ]; then + tar -xpvf /updates/$tarball -C "$SYSROOT" || exit 2 + fi echo archiving old $tarball echo .................................................. |