[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: Re: [gentoo-dev] [gentoo-user] new package notification
From: Marko Mikulicic <marko () seul ! org>
Date: 2002-09-11 6:45:30
[Download RAW message or body]
Matthew Kennedy wrote:
> Gregg <gregg@sc.am> writes:
>
>
>>I have mentioned this a couple times to usually no response. I feel that
>>it is an important feature , I was hoping to get some sort of response to
>>this as to how it should be done, or a response saying "we are already
>>working on that". Either way is fine by me :)
I wrote a script that do this some times ago. I have still to fix a
minor glitch before it's incorporated
in gentoolkit, but it's usable.
<snip filename='emerge-rsync'>
#!/bin/sh
BASE=/var/cache
USE_COLORS=yes
# end user configuration section
. /etc/make.globals
BEFORE=$BASE/ebuild-rsync.before
AFTER=$BASE/ebuild-rsync.after
NEW=$BASE/ebuild-rsync.new
REMOVED=$BASE/ebuild-rsync.removed
if [ "$USE_COLORS" == "yes" ]; then
RED="\033[;31m"
GREEN="\033[;32m"
NORMAL="\033[m"
fi
function portagetree () {
find $PORTDIR -type d -mindepth 2 -maxdepth 2
}
function inherit {
true
}
# do it
portagetree >$BEFORE
emerge $@ rsync
portagetree >$AFTER
diff $BEFORE $AFTER | grep ">" | sed "s/> //g" > $NEW
diff $BEFORE $AFTER | grep "<" | sed "s/< //g" > $REMOVED
# cleanup
rm $BEFORE $AFTER
# display new ebuilds
if ! diff -q $NEW /dev/null >/dev/null; then
echo
echo New ebuilds:
for i in $(cat $NEW); do
DESCRIPTION="$i/*.ebuild ${RED}does not exist$NORMAL"
EBUILD=$(ls $i/*.ebuild --sort=time 2>/dev/null | head -n 1)
[ -z "$EBUILD" ] || . $EBUILD
echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
done
fi
# display removed ebuilds
if ! diff -q $REMOVED /dev/null >/dev/null; then
echo
echo Removed ebuilds:
for i in $(cat $REMOVED); do
echo -e $RED${i##$PORTDIR/}$NORMAL
done
fi
</snip>
_______________________________________________
gentoo-dev mailing list
gentoo-dev@gentoo.org
http://lists.gentoo.org/mailman/listinfo/gentoo-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic