6 export PATH=$PATH:/usr/local/bin/
8 git_sha1="$(git rev-parse HEAD)"
9 docu_build_date="$(date)"
12 while read -r -d ''; do
14 done < <(find * -type f -iname '*.rst' -print0)
16 for file in "${{files[@]}}"; do
18 file_cut="${{file%.*}}"
19 gs_cp_folder="${{file_cut}}"
22 sed -i "s/_sha1_/$git_sha1/g" $file
23 sed -i "s/_date_/$docu_build_date/g" $file
27 rst2html $file > $file_cut".html"
30 rst2pdf $file -o $file_cut".pdf"