From b0105294a4f8c5b6ba957a39aded22f082a46895 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 27 Jun 2008 20:26:38 +0200 Subject: /bin/pkg: Also create local list on update --- bin/pkg | 1 + include/pkglist | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 include/pkglist diff --git a/bin/pkg b/bin/pkg index 49bc099..82d4693 100755 --- a/bin/pkg +++ b/bin/pkg @@ -326,6 +326,7 @@ pkg_update () { } elif ([ "$PKG_PROTO" = 'file' ]) { cp $PKG_ROOT/.links . } + core/include/pkglist $PDIR } pkg_upgrade () { diff --git a/include/pkglist b/include/pkglist new file mode 100755 index 0000000..4c39365 --- /dev/null +++ b/include/pkglist @@ -0,0 +1,15 @@ +#!/usr/bin/env zsh + +cd $1 || exit 100 + +rm .list + +for i in *(/); { + if ([ -d $i/.hg ]) { + echo -n "$i hg " >> .list + hg -R $i log | fgrep changeset | head -n 1 | cut -d ' ' -f 4 >> .list + } elif ([ -d $i/.git ]) { + echo -n "$i git " >> .list + git --git-dir=$i/.git log | fgrep commit | head -n 1 | cut -d ' ' -f 2 >> .list + } +} -- cgit v1.2.3