summaryrefslogtreecommitdiff
path: root/include/pkglist
blob: 95beb9cbb4ab90f446f3354beb5c30321c2fc206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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
	} else {
		echo -n "$i plain " >> .list
		ls -ablR $i | md5sum | cut -d ' ' -f 1 >> .list
	}
}