#!/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}