3 # This shell script is roughly equivalent to what "make dist" did in the
4 # autotools build system and is called from a custom CMake target.
6 # !!! FIXME: This code sort of sucks. Consider using CPack instead...
8 if [ ! -f ./CMakeLists.txt ]; then
9 echo "you are in the wrong place."
14 echo "Wrong arguments."
21 BASENAME="physfs-$VERSION"
22 TARBALL="$BASENAME.tar.gz"
23 TMPCPDIR="../9sdkujy75jv932-physfstmp-$VERSION"
24 CPDIR="$TMPCPDIR/$BASENAME"
26 echo "Packing PhysicsFS $VERSION source tarball..."
27 echo " + Setting up scratch dir..."
32 echo " + Making copy of source tree in scratch dir..."
34 echo " + Deleting cruft..."
35 pushd $CPDIR >/dev/null
36 rm -rf `svn propget svn:ignore .`
37 rm -rf `svn status |grep '?' |sed -s 's/\?//'`
39 rm -rf `find $CPDIR -type d -name '.svn'`
40 echo " + Deleting Subversion metadata..."
41 rm -rf `find $CPDIR -type d -name '.svn'`
42 echo " + Fixing up permissions..."
44 chmod a+x `find $CPDIR -type d`
45 echo " + Building final tarball..."
47 tar -czf $TARBALL -C $TMPCPDIR $BASENAME
48 echo " + Cleaning up..."
50 echo " + All done! Packed to '$TARBALL' ..."