flat SPECS available!

Mariusz Mazur mmazur at kernel.pl
Wed Apr 29 12:55:40 CEST 2009


I just did a server-side read-only SPECS that's full of symlinks to 
the ../packages spec files. I've also added a small monitoring script that 
will rename/delete/create new symlinks whenever a directory in packages/ gets 
created/deleted/renamed.

Enjoy.

--mmazur

Oh, and I'll use this mail as backup for the script:


#!/bin/bash

inotifywait -q -m  -e create -e move -e delete /cvsroot/packages | (
        cd /cvsroot/SPECS;
        while read path change file; do
                if [ -z "`echo $change|grep ISDIR`" ]; then
                        continue
                fi
                change=`echo $change|cut -d, -f 1`
                echo `date` $change $file >> /var/log/flatspecsd

                if [ "$change" == "CREATE" ]; then
                        ln -s "../packages/${file}/${file}.spec,v"
                elif [ "$change" == "MOVED_TO" ]; then
                        ln -s "../packages/${file}/${file}.spec,v"
                elif [ "$change" == "DELETE" ]; then
                        rm -f "${file}.spec,v"
                elif [ "$change" == "MOVED_FROM" ]; then
                        rm -f "${file}.spec,v"
                fi
        done
        )


More information about the pld-devel-en mailing list