Skip to content

Latest commit

 

History

History
executable file
·
54 lines (44 loc) · 1.26 KB

makedist.sh

File metadata and controls

executable file
·
54 lines (44 loc) · 1.26 KB
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# This shell script is roughly equivalent to what "make dist" did in the
# autotools build system and is called from a custom CMake target.
# !!! FIXME: This code sort of sucks. Consider using CPack instead...
if [ ! -f ./CMakeLists.txt ]; then
echo "you are in the wrong place."
exit 1
fi
if [ -z "$1" ]; then
echo "Wrong arguments."
exit 2
fi
set -e
VERSION="$1"
BASENAME="physfs-$VERSION"
TARBALL="$BASENAME.tar.gz"
TMPCPDIR="../9sdkujy75jv932-physfstmp-$VERSION"
CPDIR="$TMPCPDIR/$BASENAME"
echo "Packing PhysicsFS $VERSION source tarball..."
echo " + Setting up scratch dir..."
rm -rf $TMPCPDIR
mkdir $TMPCPDIR
Apr 3, 2007
Apr 3, 2007
30
mkdir $CPDIR
31
32
33
34
echo " + Making copy of source tree in scratch dir..."
cp -R . $CPDIR/
echo " + Deleting cruft..."
Apr 3, 2007
Apr 3, 2007
35
36
37
38
pushd $CPDIR >/dev/null
rm -rf `svn propget svn:ignore .`
rm -rf `svn status |grep '?' |sed -s 's/\?//'`
popd >/dev/null
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
rm -rf `find $CPDIR -type d -name '.svn'`
echo " + Deleting Subversion metadata..."
rm -rf `find $CPDIR -type d -name '.svn'`
echo " + Fixing up permissions..."
chmod -R a+rw $CPDIR
chmod a+x `find $CPDIR -type d`
echo " + Building final tarball..."
rm -f $TARBALL
tar -czf $TARBALL -C $TMPCPDIR $BASENAME
echo " + Cleaning up..."
rm -rf $TMPCPDIR
echo " + All done! Packed to '$TARBALL' ..."
set +e
exit 0