4 project="$(git remote -v | head -n1 | awk '{{print $2}}' | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//')"
5 export PATH=$PATH:/usr/local/bin/
7 git_sha1="$(git rev-parse HEAD)"
8 docu_build_date="$(date)"
11 while read -r -d ''; do
13 done < <(find * -type f -iname '*.rst' -print0)
15 for file in "${{files[@]}}"; do
17 file_cut="${{file%.*}}"
18 gs_cp_folder="${{file_cut}}"
21 sed -i "s/_sha1_/$git_sha1/g" $file
22 sed -i "s/_date_/$docu_build_date/g" $file
26 rst2html $file > $file_cut".html"
29 rst2pdf $file -o $file_cut".pdf"