[Paraview-developers] Exporting to a tarball

Fabian, Nathan ndfabia at sandia.gov
Thu Apr 29 19:13:40 EDT 2010


Hi,

I found it non-trivial to export the source directly from git into a tarball
with submodules.  On the off chance someone else needs to do this, here's a
script that mostly works (as long as you have branch names that match across
submodules)

#!/bin/sh
branch=master
if [ $# -gt 0 ]; then
  branch=$1
fi

git archive --prefix=ParaView/ $branch > paraview.tar
for i in  `git submodule status | cut -f 3 -d \ `; do
  oldPWD=`pwd`
  cd $i
  git archive --prefix=ParaView/$i/ $branch > $oldPWD/tmp.tar
  cd $oldPWD
  tar -Af paraview.tar tmp.tar
  rm -f tmp.tar
done

Nathan.




More information about the Paraview-developers mailing list