update-stagit.sh (494B)
1 #!/bin/sh 2 3 _rootdir="/srv/http" 4 _reporoot="/srv/git" 5 6 _repos=`ls "$_reporoot" | sed 's/.git$//'` 7 _repos_full=`ls "$_reporoot" | xargs printf "$_reporoot/%s\n"` 8 9 for _repo in $_repos; do 10 _htmlpath="$_rootdir/$_repo" 11 [ ! -e "$_htmlpath" ] && mkdir -p "$_htmlpath" 12 cd "$_htmlpath" 13 stagit "$_reporoot/$_repo.git" 14 done 15 16 cd "$_rootdir" 17 stagit-index `echo $_repos_full` > index.html 18 19 for _repo in $_repos; do 20 [ -f style.css ] && cp style.css $_repo/ 21 [ -f logo.png ] && cp logo.png $_repo/ 22 done 23