Skip to content

Instantly share code, notes, and snippets.

@Kami
Created July 16, 2012 01:54
Show Gist options
  • Select an option

  • Save Kami/3119800 to your computer and use it in GitHub Desktop.

Select an option

Save Kami/3119800 to your computer and use it in GitHub Desktop.
#!/bin/bash
basedir=`readlink -f $0`
basedir=`dirname $basedir`
versions=( "0.2.0" "0.3.0" "0.3.1" "0.4.0" "0.4.1" "0.4.2" "0.5.2" "0.6.0-beta1" "0.6.1" "0.6.2" "0.7.1" "0.8.0" "0.9.1" )
for version in ${versions[@]}
do
echo "Processing: $version"
echo "Checking out"
svn co https://svn.apache.org/repos/asf/libcloud/tags/$version
cd $version
find -name "types.py" -print0 | xargs -0 sed -i "s/@cvar:/@cvar/g"
echo "Regenerating"
python setup.py apidocs
cd ..
echo "Removing old docs and adding new"
cp -r "$basedir/$version/apidocs" /w/lc/site/content/apidocs
cd /w/lc/site/content/apidocs
svn rm --force $version
svn rm --force $version
svn commit -m "Remove api docs for version $version"
rm -rf $version
mv apidocs $version
svn add $version
svn commit -m "Add regenerated api docs for version $version"
cd $basedir
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment