summaryrefslogtreecommitdiff
path: root/index_repo
blob: f1f28d7cb15145f3574030e1d49358b4037bd834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

#
# Index a repo
#

REPOIDX="repo_idx.txt"
DSCRIDX="descr_idx.txt"
RDMEIDX="readme_idx.txt"

if [ $# -eq 0 ]; then 
	start="./"
else
	start="$@"
fi

find $start -type d | grep -E "\/.*\/" |  sed -E 's/.\/([a-z]+)\//\1:\/\//1' \
	> ${REPOIDX}

find $start -type f -name 'DESCR' | tr '\n' ' ' \
	> ${DSCRIDX}

find $start -type f -iname 'readme*' | tr '\n' ' ' \
	> ${RDMEIDX}