From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3100 Path: news.gmane.org!not-for-mail From: Zvi Gilboa Newsgroups: gmane.linux.lib.musl.general Subject: tool: musl-pbs Date: Fri, 12 Apr 2013 20:38:10 -0400 Message-ID: <5168A8F2.9090109@eservices.virginia.edu> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000609070505090209000007" X-Trace: ger.gmane.org 1365813502 28764 80.91.229.3 (13 Apr 2013 00:38:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Apr 2013 00:38:22 +0000 (UTC) To: Original-X-From: musl-return-3104-gllmg-musl=m.gmane.org@lists.openwall.com Sat Apr 13 02:38:26 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UQoU5-0002Yn-Uf for gllmg-musl@plane.gmane.org; Sat, 13 Apr 2013 02:38:26 +0200 Original-Received: (qmail 21847 invoked by uid 550); 13 Apr 2013 00:38:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 21839 invoked from network); 13 Apr 2013 00:38:23 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 X-Originating-IP: [71.206.170.124] Xref: news.gmane.org gmane.linux.lib.musl.general:3100 Archived-At: --------------000609070505090209000007 Content-Type: multipart/alternative; boundary="------------080204010307010704000503" --------------080204010307010704000503 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Greetings, The attached scripts provide a quick way to view the current PkgSrc results for a select package (or several packages matching a pattern). In addition to the comments found within the scripts, here is a brief summary: *musl-pbs: *--> the main script --> usage: musl-pbs SEARCH_PATTERN --> example: musl-pbs databases/pg *musl-pbs-update: *--> obtains information from http://wiki.musl-libc.org/wiki/Pkgsrc_results --> will be automatically executed upon the first run of *musl-pbs *-->**creates *musl-pbs.src* (plain text) in the user's $HOME folder --> dependencies: /wget/, /html2text/ Best regards, Zvi ** --------------080204010307010704000503 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Greetings,

The attached scripts provide a quick way to view the current PkgSrc results for a select package (or several packages matching a pattern).

In addition to the comments found within the scripts, here is a brief summary:

musl-pbs:
--> the main script
--> usage:     musl-pbs   SEARCH_PATTERN
--> example: musl-pbs   databases/pg

musl-pbs-update:
--> obtains information from http://wiki.musl-libc.org/wiki/Pkgsrc_results
--> will be automatically executed upon the first run of musl-pbs
--> creates musl-pbs.src (plain text) in the user's $HOME folder
--> dependencies: wget, html2text

Best regards,
Zvi

--------------080204010307010704000503-- --------------000609070505090209000007 Content-Type: text/plain; charset="UTF-8"; name="musl-pbs" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="musl-pbs" #!/usr/bin/env sh # musl-pbs (musl-based package build status) # $1: search pattern (package name) # source file: $HOME/musl-pbs.src # columns: Deps Builds Tests Package/patches # script created by Zvi Gilboa, copyright (and left) deferred # validation if [ "$1"X = "X" ]; then echo echo "usage: musl-pbs SEARCH_PATTERN" echo echo "example: musl-pbs databases/pg" echo exit 2 fi # our source file musl_pbs_src=$HOME/musl-pbs.src # the update script musl_pbs_update='musl-pbs-update' # see if the source file already exists if [ ! -f $musl_pbs_src ] then # source file does not exist: # generate it using the update script possession="'s" echo echo "first-time run: retrieving musl-based package build status from the project$possession Wiki" sh $musl_pbs_update fi # print the header HEADER=`head -n +1 $musl_pbs_src` echo && echo $HEADER # go fancy echo $HEADER | sed -e 's/./=/g' # and all lines matching the search pattern grep $1 $musl_pbs_src echo # all done exit 0 --------------000609070505090209000007 Content-Type: text/plain; charset="UTF-8"; name="musl-pbs-update" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="musl-pbs-update" #!/usr/bin/env sh # musl-pbs-update (musl-based package build status source update) # retrieves http://wiki.musl-libc.org/wiki/Pkgsrc_results # and then converts it into a grep-friendly text file. # script created by Zvi Gilboa, copyright (and left) deferred # user should have write permission in the $HOME folder musl_pbs_src=$HOME/musl-pbs.src # temporary files, deleted once we are done musl_pbs_html=$HOME/musl-pbs.html.tmp musl_headless=$HOME/musl-HEADLESS.tmp # obtain the source html document from the musl Wiki wget --quiet --output-document=$musl_pbs_html http://wiki.musl-libc.org/wiki/Pkgsrc_results # locate the actual information (status table) within the html file pbs_table_begin=`grep -n 'sortable' $musl_pbs_html | cut -f1 -d':'` # chop off the head tail -n +$pbs_table_begin $musl_pbs_html > $musl_headless # locate the table's end () pbs_table_end=`grep -n '' $musl_headless | cut -f1 -d':'` # cut off the tail head -n +$pbs_table_end $musl_headless > $musl_pbs_html # green means yes sed -i -e 's/ bgcolor="green">.yesX-f--<#>n/a <#g' $musl_pbs_html # by default, red means no sed -i -e 's/ bgcolor="red">.no