Created
June 19, 2014 21:00
-
-
Save avsm/d26e393a0cdcf7613821 to your computer and use it in GitHub Desktop.
postproc script for ocl website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
rm -rf pkg | |
~/src/git/avsm/opam2web/src/_build/opam2web.native --where='tag:org:mirage' --where='tag:org:ocamllabs' --prefix="/projects/ocamllabs/" | |
cd pkg | |
rm -f index-*.html | |
tail -n +2 index.html |sed '$d' > index-b.html | |
rm -f index.html | |
# generate subdirs | |
echo 'navstop=1, *glob("*/index-b.html")' > uconfig.txt | |
# uconfig per version | |
pkgs=`find . -type d -maxdepth 1 |grep -v '^\.$' | sed -e 's,^\./,,g'` | |
for i in $pkgs; do | |
cd $i | |
dirs=`find . -type d -maxdepth 1 |grep -v '^\.$' | sed -e 's,^\./,,g'` | |
echo '*glob("*/index-b.html")' > uconfig.txt | |
echo "<title>$i</title><body>placeholder</body>" > index-b.html | |
for d in $dirs; do | |
cd $d | |
mv index.html index-b.html | |
echo "" > uconfig.txt | |
cd .. | |
done | |
cd .. | |
done | |
cd .. | |
rm -rf ~/src/git/ocamllabs/ocl-reporter/pages/pkg | |
mv pkg ~/src/git/ocamllabs/ocl-reporter/pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment