diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2008-12-05 09:14:03 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2008-12-05 09:14:03 +0000 |
commit | 8b81216053257b70ca9ab50bfba0f0f3fc09df53 (patch) | |
tree | 6f1fc929fb98eaa5ab4114683e2be27be32c34ad /scripts/lib/ptxd_lib_cfgchg.sh | |
parent | 2666f26b10da4e0eb80a9ac0e17e9f12ea446e72 (diff) | |
download | ptxdist-8b81216053257b70ca9ab50bfba0f0f3fc09df53.tar.gz ptxdist-8b81216053257b70ca9ab50bfba0f0f3fc09df53.tar.xz |
* lib/ptxd_lib_cfgchg.sh:
another prove of concept implementation
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@9189 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/lib/ptxd_lib_cfgchg.sh')
-rw-r--r-- | scripts/lib/ptxd_lib_cfgchg.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_cfgchg.sh b/scripts/lib/ptxd_lib_cfgchg.sh new file mode 100644 index 000000000..b0faf9e91 --- /dev/null +++ b/scripts/lib/ptxd_lib_cfgchg.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +ptxd_cfgchg_generate() +{ + gawk ' + BEGIN { + FS = "=\"|\"|=| is not set"; + } + + $1 ~ /^PTX_MAP_TO_package/ { + pkg = gensub(/PTX_MAP_TO_package_/, "", "g", $1); +# print pkg, $2; + + pkgs[pkg] = $2; + + next; + } + + $1 ~ /^[-\+](|# )PTXCONF/ { + opt = gensub(/[-\+](|# )PTXCONF_/, "", "g", $1); + + do { + if (opt in pkgs) + print opt, "state/" pkgs[opt] ".prepare"; + + } while (sub(/_+[^_]+$/, "", opt)); + } + + END { + } + + ' \ + "${PTX_MAP_ALL}" \ + - +} + + +ptxd_cfgchg() +{ + ptxd_cfgchg_generate +} + +cat | ptxd_cfgchg
\ No newline at end of file |