1#!/bin/csh 2# 3# A csh script to checkout OPT++ and create a source tar file for distribution. 4# Arguments - tar file tag, optpp-version 5 6if ($#argv < 2) then 7 echo "Usage: extract_src.csh file_tag [dakota-version]" 8 echo "Note: use the string 'head' to extract the head version" 9 echo "Example: extract_src.csh 3_1_2 head " 10 exit 11endif 12 13# optpp Version 14echo "Begin script to create optpp_$1.src.tar" 15if ($2 == 'head') then 16 cvs co -P OPT++ 17else 18 cvs co -r -P $2 OPT++ 19endif 20 21# --------------------- 22# Miscellaneous Cleanup 23# 08/10/2004 PJW This section needs to be revisited 24# Want to be in top level directory? 25# --------------------- 26#cd .. 27# remove all CVS directories 28#find . -name CVS | xargs rm -rf 29# remove other unneeded directories 30#\rm -rf tests/sqa/v* 31#cd .. 32 33# ------------------- 34# Create src tar file 35# ------------------- 36pwd 37# use explict tar commands to tar only the files wanted 38tar rvf optpp_$1.src.tar OPT++/config* 39tar rvf optpp_$1.src.tar OPT++/docs 40tar rvf optpp_$1.src.tar OPT++/include 41tar rvf optpp_$1.src.tar OPT++/newmat11 42tar rvf optpp_$1.src.tar OPT++/src 43tar rvf optpp_$1.src.tar OPT++/tests 44tar rvf optpp_$1.src.tar OPT++/INSTALL 45tar rvf optpp_$1.src.tar OPT++/GNU_LGPL 46tar rvf optpp_$1.src.tar OPT++/COPYRIGHT 47tar rvf optpp_$1.src.tar OPT++/README 48tar rvf optpp_$1.src.tar OPT++/configure.in 49tar rvf optpp_$1.src.tar OPT++/Makefile.in 50 51# Clean up this OPT++ area, since the tar file is now the master 52# (and the OPT++ working directory and tar file will differ) 53\rm -rf OPT++ 54 55echo "OPT++ tar file optpp_$1.src.tar complete" 56