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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#! /bin/csh
# make_source_tar
# ver 1.0 6/10 *acm*
# ver 2.0 11/10 *acm* change CVS to svn
# this script gets the source code, asking for any particular tag, or for trunk
if ( $#argv == 2 ) then
set targ_dist_parent = $argv[1]
set tag = $argv[2]
set source_dir = $targ_dist_parent
else
echo ""
echo "Usage:"
echo " make_source_tar target_area tag"
echo "OR"
echo " make_source_tar target_area trunk"
echo "e.g.,"
echo " make_source_tar /home/users/tmap/ferret v6_6_2_release"
echo "will make a gzipped tar file of the corresponding Ferret source in the directory"
echo " /home/users/tmap/ferret/v6_6_2_release"
echo "Use 'trunk' if no tag or branch is to be used"
echo ""
exit 0
endif
cd $source_dir
mkdir $tag
cd $tag
#use svn now to checkout desired files
echo "Extracting FERRET source code......."
if ( $tag == trunk ) then
svn checkout file:///home/users/tmap/svn/repos/ferret/trunk FERRET >&! install_log
else
svn checkout file:///home/users/tmap/svn/repos/ferret/tags/$tag FERRET >&! install_log
endif
cp FERRET/fer/README FERRET/
rm -rf FERRET/html_docs
# get tar file location
set ctar_file = fer_source.tar.gz
echo "Ready to create gzipped tar file $ctar_file"
ready:
echo "OK to continue ?"
set ans = $<
switch($ans)
case y:
breaksw
case n:
exit 0
default:
echo "must answer y or n"
goto ready
endsw
# make the gzipped tar file
cd $source_dir/$tag
tar cvzf $ctar_file --exclude .svn FERRET >&! tar_create_log
ls -l $ctar_file*
echo "If there are any problems with the tar file, see $source_dir/$tag/tar_create_log"
echo "for more information"
|