diff options
Diffstat (limited to 'index_repo')
-rwxr-xr-x | index_repo | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/index_repo b/index_repo new file mode 100755 index 0000000..f1f28d7 --- /dev/null +++ b/index_repo @@ -0,0 +1,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} |