summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-05-27 12:00:04 +0100
committerLeah Rowe <leah@libreboot.org>2023-05-27 12:00:04 +0100
commit06c92d4a4aa58e554b52283a7154b6e69c5b82e5 (patch)
treea613b48aa49daf40a4fc21ea0a009416090638df
parentff954c5b73c4010f9984e0c543779f3692767c0c (diff)
blobutil: merge with main script
make blobutil a symlink. Example of command changes: ./blobutil download x220_8mb is now: ./update blobs download x220_8mb The old command still works, for compatibility. Signed-off-by: Leah Rowe <leah@libreboot.org>
l---------[-rwxr-xr-x]blobutil50
-rwxr-xr-xlbmk6
-rwxr-xr-xresources/scripts/update/blobs/download (renamed from resources/scripts/blobs/download)0
-rwxr-xr-xresources/scripts/update/blobs/extract (renamed from resources/scripts/blobs/extract)0
-rwxr-xr-xresources/scripts/update/blobs/inject (renamed from resources/scripts/blobs/inject)0
5 files changed, 6 insertions, 50 deletions
diff --git a/blobutil b/blobutil
index 2a14bb0..012b4ec 100755..120000
--- a/blobutil
+++ b/blobutil
@@ -1,49 +1 @@
-#!/usr/bin/env bash
-# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
-# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
-# SPDX-License-Identifier: GPL-3.0-only
-
-script_dir="resources/scripts/blobs"
-modes=$(ls -1 ${script_dir})
-
-main()
-{
- if [ $# -lt 1 ]; then
- printf "%s: Error: you must specify a mode\n" $0
- usage
- exit 1
- fi
-
- ./.gitcheck
-
- mode=${1}
- shift
- args=$@
-
- if [ ! -f "${script_dir}/${mode}" ]; then
- printf "Error: No mode ${mode}\n"
- usage
- exit 1
- fi
-
- ./${script_dir}/${mode} ${args} || exit 1
-
- ./.gitcheck clean
-}
-
-usage(){
- cat <<- EOF
- Usage: ./blobutil [mode] <options>
- Example: ./blobutil download x230_12mb
-
- Possible options for mode are
- ${modes}
-
- Mode descriptions:
- download: Try to automatically generate blobs for specified board
- inject: Inject blobs for specified board into specified rom
- extract: Extract blobs from specified rom for specified board
- EOF
-}
-
-main $@
+lbmk \ No newline at end of file
diff --git a/lbmk b/lbmk
index 16f479c..e86190e 100755
--- a/lbmk
+++ b/lbmk
@@ -34,7 +34,11 @@ main()
if [ "${0##*/}" = "lbmk" ]; then
die "Do not run the lbmk script directly!"
elif [ "${0##*/}" = "download" ]; then
- ./update module $@
+ ./update module $@ || exit 1
+ exit 0
+ elif [ "${0##*/}" = "blobutil" ]; then
+ ./update blobs $@ || exit 1
+ exit 0
elif [ $# -lt 2 ]; then
die "Too few arguments. Try: ${0} help"
fi
diff --git a/resources/scripts/blobs/download b/resources/scripts/update/blobs/download
index 57bdfe6..57bdfe6 100755
--- a/resources/scripts/blobs/download
+++ b/resources/scripts/update/blobs/download
diff --git a/resources/scripts/blobs/extract b/resources/scripts/update/blobs/extract
index 8e9c74e..8e9c74e 100755
--- a/resources/scripts/blobs/extract
+++ b/resources/scripts/update/blobs/extract
diff --git a/resources/scripts/blobs/inject b/resources/scripts/update/blobs/inject
index 51f6725..51f6725 100755
--- a/resources/scripts/blobs/inject
+++ b/resources/scripts/update/blobs/inject