1 #!/bin/sh 2 3 [ -z "$1" ] && echo "ERROR: file path not provided" && exit 1 4 5 git_folder="$1" 6 7 # generate index 8 # stagit-index $(find "$git_folder" -mindepth 1 -maxdepth 2 -name '*.git' \ 9 # -type d -printf '%P\n' | sort) > "$git_folder"/index.html 10 11 stagit-index $(find "$git_folder" -mindepth 1 -maxdepth 2 -name '*.git' \ 12 -type d -printf '%P\n' | sort) > "$git_folder"/index.html 13 14 # append git files to .gitignore 15 # ignore symlinks 16 # find . -type l | sed -e s'/^\.\///g' >> .gitignore 17 18 # for repo in $(find "$git_folder" -mindepth 1 -maxdepth 1 -type d -printf '%f\n');\ 19 # do 20 # (cd "$git_folder"/"$repo"; stagit "$git_folder"/"$repo".git \ 21 # -c "$git_folder"/.cache; 22 # ln -sf files.html index.html; 23 # ln -sf ../style.css style.css 24 # ln -sf ../logo.png logo.png 25 # ln -sf ../favicon.png favicon.png 26 # ) 27 # done 28 29 # link repos to git home (makes url prettier) 30 # for repo in $(find repos -name *.git); do ln -sf $repo /home/git; done
