summaryrefslogtreecommitdiff
path: root/blobutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2022-11-14 00:51:12 +0000
committerLeah Rowe <leah@libreboot.org>2022-11-14 00:51:12 +0000
commit7af9953463c65fe2f02704e6bce815d830e58d7d (patch)
treedce6c19484fd27288c65ac33092040601d8a0622 /blobutil
parentb5c25efed46f0a9121023997c6758eda5c3f5017 (diff)
pragmatic system distribution guideline compliancepsdg
osboot is now part of libreboot, and will soon shut down. libreboot now conforms to osboot policy.
Diffstat (limited to 'blobutil')
-rwxr-xr-xblobutil44
1 files changed, 44 insertions, 0 deletions
diff --git a/blobutil b/blobutil
new file mode 100755
index 00000000..6a48067e
--- /dev/null
+++ b/blobutil
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
+# SPDX-License-Identifier: GPL-3.0-only
+
+./.gitcheck
+
+script_dir="resources/scripts/blobs"
+modes=$(ls -1 ${script_dir})
+
+Print_help(){
+ 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
+}
+
+
+if [ $# -gt 0 ]; then
+ mode="${1}"
+ shift
+ args="$@"
+
+ if [ ! -f "${script_dir}/${mode}" ]; then
+ printf "Error: No mode ${mode}\n"
+ Print_help
+ exit 1
+ else
+ ./${script_dir}/${mode} ${args}
+ fi
+
+else
+ printf 'Error: You must specify a mode\n'
+ Print_help
+fi
+
+./.gitcheck clean