3 # Simple script which does the following:
4 # o Generates a src tarball from a WORKAREA
5 # o Copies it over to ~/test and unpacks it
6 # o Generates a src tarball from src tarball
7 # o Compares the build status' ... reports problems
16 echo "srctest requires one argument - package name"
22 echo "WORKAREA is not set -- aborting."
28 echo "$tmpdir exists already -- aborting."
34 echo "Cannot create $tmpdir -- aborting."
40 # Pleasantries are now out of the way, lets proceed.
41 # NB: If something goes wrong we'll leave the unpacked
42 # source alone for consumption by a human.
51 echo "Problem? -- leaving $tmpdir for inspection"
63 echo Makepkgs thinks theres a problem in $1
67 if [ ! -f build/$package-*.src.tar.gz ]
69 echo Makepkgs failed to create build/package-*.src.tar.gz
75 trap "_cleanup; exit \$status" 0 1 2 3 15
77 # first, build from the WORKAREA
78 _buildme $WORKAREA/cmd/$package
81 gunzip < $WORKAREA/cmd/$package/build/$package-*.src.tar.gz | tar xf -
83 # now, cross check the src build
84 _buildme $tmpdir/$package-*