#!/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