utilies

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 42bcf1062608167148f9d6ce48144d41bb51a92a
Author: Taco-C <perian.forod@gmail.com>
Date:   Wed,  1 Jul 2020 15:29:50 +0000

Add update-stagit.sh

Diffstat:
Aupdate-stagit.sh | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/update-stagit.sh b/update-stagit.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +_rootdir="/srv/http" +_reporoot="/srv/git" + +_repos=`ls "$_reporoot" | sed 's/.git$//'` +_repos_full=`ls "$_reporoot" | xargs printf "$_reporoot/%s\n"` + +for _repo in $_repos; do + _htmlpath="$_rootdir/$_repo" + [ ! -e "$_htmlpath" ] && mkdir -p "$_htmlpath" + cd "$_htmlpath" + stagit "$_reporoot/$_repo.git" +done + +cd "$_rootdir" +stagit-index `echo $_repos_full` > index.html + +for _repo in $_repos; do + [ -f style.css ] && cp style.css $_repo/ + [ -f logo.png ] && cp logo.png $_repo/ +done +