-# my projects all have README or --help with a short single line
-# description which I parse and put into the gitweb description.
-_git_desc_readme() {
- while read -r line; do
- [[ $line ]] || continue
- if echo "$line" | grep "^ *[#*]" &>/dev/null; then
- continue
- fi
- echo "$line" > .git/description
- break
- done < README*
-}
-gitweb_descriptions() {
- for d in $gitroot/*; do
- d=$(readlink -f $d)
- cd $d/..
- e ${PWD##*/}
- shopt -s nullglob
- f=(!(LICENSE|COPYING|README|.git))
- shopt -u nullglob
- if [[ ${#f[@]} == 1 && ! -d $f ]]; then
- if [[ ! -x $f ]]; then
- if [[ $f == *-function ]]; then
- ${f%-function} --help | sed -n '2p' > .git/description
- else
- _git_desc_readme
- fi
- else
- $f --help | sed -n '2p' > .git/description
- fi
- else
- _git_desc_readme
- fi
- done
-}
-
-gitweb_descriptions
-
-./build.rb