[sbopkg-users] New feauture: List packages by author
Jostein Berntsen
jbernts at broadpark.no
Thu Dec 19 19:12:40 UTC 2013
On 18.12.13,16:24, David Woodfall wrote:
> On (18/12/13 13:33), Jostein Berntsen <jbernts at broadpark.no> put forth the proposition:
> >This would be really useful for maintaining SlackBuilds for those who have a
> >lot of packages to update.
> >
> >Jostein
>
> Is this any use to you? Edit NAME, ROOT and REPO, and it will copy
> your own slackbuilds do a folder for easier sifting:
>
> =======================
> #!/bin/sh
>
> set -e
>
> sbopkg -r
> NAME="Woodfall"
> REPO=14.1
> ROOT=/root/14.1
> mkdir -p $ROOT
> cd $ROOT
>
> for i in $(grep -l $NAME /var/lib/sbopkg/SBo/$REPO/*/*/*.info)
> do
> dir=$(dirname $i)
> cat=$(echo $dir | cut -d'/' -f7)
> prgnam=$(echo $dir | cut -d'/' -f6)
> mkdir -p $cat/$prgnam
>
> cp -vr $dir $cat
> let num=$num+1
> done
>
> echo $num packages
> ========================
>
Thanks! This inspired me to make my own version of your script which gives
me the output I need:
=========================
#!/bin/sh
set -e
sbopkg -r -q
NAME="Jostein Berntsen"
REPO=14.1
ROOT=/home/jostein/14.1/jb
mkdir -p $ROOT
cd $ROOT
echo
for i in $(grep -l "$NAME" /var/lib/sbopkg/SBo/$REPO/*/*/*.info)
do
let num=$num+1
echo $num.
dir=$(dirname `pwd`$i | cut -d"/" -f11)
pack=$(cat $i | sed '/PRGNAM\|VERSION\|HOMEPAGE/!d' $i | paste -d "," -s)
echo $dir: $pack
echo
done
echo $num packages authored by $NAME
=========================
Regards,
Jostein
More information about the sbopkg-users
mailing list