From patchwork Tue Jan 15 16:47:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [3/3] Add parsing of Config.in in ipk-post.sh. Date: Tue, 15 Jan 2013 06:47:10 -0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 212242 Message-Id: <1358268430-2431-4-git-send-email-jezz@sysmic.org> To: buildroot@busybox.net Built packages now contains description from Buildroot. Signed-off-by: Jérôme Pouiller --- support/scripts/ipk-post.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/support/scripts/ipk-post.sh b/support/scripts/ipk-post.sh index a5beacb..2bfd736 100755 --- a/support/scripts/ipk-post.sh +++ b/support/scripts/ipk-post.sh @@ -38,6 +38,23 @@ for P in $PKG $PKG-i18n $PKG-doc $PKG-dbg $PKG-dev; do [ $P == $PKG-dbg ] && echo "Depends: $PKG" [ $P == $PKG-doc ] && echo "Recommends: $PKG" echo "Description: $PKG" + STATE=EMPTY + while IFS= read LINE; do + if [[ $STATE == GETINDENT ]]; then + INDENT="$(echo "$LINE" | grep -o '^[ ]*')" + STATE=GETHELP + fi + if [[ $STATE == GETHELP ]]; then + if [[ "$LINE" =~ ^"$INDENT" ]]; then + echo " ${LINE#$INDENT}" + elif [[ "$LINE" == "" ]]; then + echo " ." + else + break + fi + fi + [[ "$LINE" =~ ^.*-*help-*$ ]] && STATE=GETINDENT + done < $PKG_DIR/Config.in [ $P == $PKG-i18n ] && echo -e " .\n This package contains locales files" [ $P == $PKG-dev ] && echo -e " .\n This package contains developement files" [ $P == $PKG-dbg ] && echo -e " .\n This package contains debug symbols"