diff options
author | Wynn Wolf Arbor | 2019-12-23 12:37:32 +0100 |
---|---|---|
committer | Wynn Wolf Arbor | 2020-02-29 18:50:41 +0100 |
commit | 6390333332628437c142fb5e93b1b2f3aaa54b6c (patch) | |
tree | 9a97de265673065c91750a922fb3ec271014e375 /merge.sh | |
download | kernfrag-6390333332628437c142fb5e93b1b2f3aaa54b6c.tar.gz |
Initial import
Diffstat (limited to 'merge.sh')
-rwxr-xr-x | merge.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/merge.sh b/merge.sh new file mode 100755 index 0000000..69e3c37 --- /dev/null +++ b/merge.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +errx() { + printf "$@" >&2 + exit 1 +} + +set -e + +host=${1:-$(hostname)} + +if ! test -r "kernfrag/templates/base"; then + errx "config: Could not find base template\n" +fi + +if ! test -r "kernfrag/templates/$host"; then + errx "config: Could not find template for '%s'\n" "$host" +fi + +printf "Starting merge for %s...\n\n" "$host" + +awk 'NF { printf "%s%s\0", "kernfrag/fragments/", $1 }' \ + "kernfrag/templates/base" "kernfrag/templates/$host" | xargs -0 scripts/kconfig/merge_config.sh |