summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/defconfig.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/defconfig.sh b/include/defconfig.sh
new file mode 100755
index 00000000..f022937a
--- /dev/null
+++ b/include/defconfig.sh
@@ -0,0 +1,11 @@
+# Copyright (c) 2023 Leah Rowe <leah@libreboot.org>
+# SPDX-License-Identifier: MIT
+
+check_defconfig()
+{
+ no_config="printf \"No target defconfig in %s\\n\" ${1} 1>&2; return 1"
+ for x in "${1}"/config/*; do
+ [ -f "${x}" ] && no_config=""
+ done
+ eval "${no_config}"
+}