You are not logged in.

#1 2005-04-10 11:21:13

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

repolist.sh

i made this script to help me post the contents of my repo on the forum - it's pretty simple but it preformats with phpbb code so that you just paste the text into a post, complete with links to pkg homepages and your online PKGBUILDS big_smile - you can see what it churns out here

i figured anyone could easily adapt it to do the same for them

I should also note that this was all inspired/copied from the way Encelo presents his repo on the boards

#!/bin/sh

repo=$1
pkgdir=$2

#change me to your online PKGBUILD dir
pkgbuild_repo_url=http://dtw.jiwe.org/share/pkgs/dibble/PKGBUILDS/

format_bbcode() {
    #change path to your local repos
    source /home/pkgs/$repo/PKGBUILDS/$pkgdir/PKGBUILD
    cat << EOF >>${output}
[list][*][b]$pkgname - $pkgver[/b]
[url=$url]Homepage[/url]
[url=$pkgbuild_repo_url$pkgdir/PKGBUILD]PKGBUILD[/url]
$pkgdesc[/list]
EOF
}

if [ -z $1 ] ; then 
    echo "No repo given dummy!"
    exit
fi

if [ -z $pkgdir] ; then
    output=$HOME/repolist.txt
    echo "[u][b]$repo repo pkg listing[/b][/u]" >${output}
    echo >>${output}
    #change path to your local repos
    cd /var/abs/$repo
    find * -maxdepth 0 -type d | while read pkgdir ; do
        format_bbcode
    done
else
    output=$HOME/${pkgname}_entry.txt
    echo "${pkgname} pkg listing" >${output}
    format_bbcode
fi

Offline

#2 2005-05-29 02:34:14

encelo
Member
From: Oxford, UK
Registered: 2005-02-23
Posts: 96
Website

Re: repolist.sh

Nice script! I should adopt it soon or later... smile
Thank you for giving credits. wink


Blog | Twitter | nCine 2D game engine
All problems in computer graphics can be solved with a matrix inversion. - James Blinn.

Offline

#3 2005-06-04 21:07:18

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Offline

#4 2005-06-05 07:22:32

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: repolist.sh

okey-doke!

Offline

Board footer

Powered by FluxBB