[Bio] / ReleaseTools / mkworkdir Repository:
ViewVC logotype

View of /ReleaseTools/mkworkdir

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (download) (annotate)
Tue Dec 2 23:39:16 2003 UTC (15 years, 10 months ago) by efrank
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, rast_rel_2014_0912, rast_rel_2008_06_18, rast_rel_2008_06_16, mgrast_dev_04082011, Root-bobdev_news, merge-trunktag-bobdev_news-2, merge-trunktag-bobdev_news-1, rast_rel_2009_05_18, rast_rel_2009_0925, rast_rel_2010_0118, preTreatmanDyn, merge-trunktag-bodev_news-3, rast_rel_2009_02_05, rast_rel_2011_0119, rast_rel_2008_12_18, rast_rel_2008_10_09, rast_release_2008_09_29, mgrast_rel_2008_0919, rast_rel_2009_07_09, rast_rel_2011_0928, mgrast_rel_2008_0917, mgrast_dev_04052011, sc04-finalDay, merge-bodev_news-3, V00-00-05, V00-00-04, V00-00-07, V00-00-06, V00-00-09, mobedac_release_05302012, V00-00-10, rast_rel_2010_0928, delong-02, mgrast_version_3_2, gunk, caBIG-05Apr06-00, mgrast_dev_02212011, preSchematools, mgrast_rel_2008_0625, V00-00-12, V00-00-13, mgrast_release_3_0_4, V00-00-11, mgrast_release_3_0_2, mgrast_release_3_0_3, V00-00-14, V00-00-15, merge-bobdev_news-2, merge-bobdev_news-1, mgrast_dev_05262011, mgrast_rel_2008_0806, rast_rel_2008_08_07, myrast_33, rast_rel_2008_09_29, mgrast_dev_02222011, stMigration0, mgrast_dev_10262011, rast_rel_2008_11_24, sc2004-4, sc2004-3, sc2004-2, sc2004-1, sc2004-0, mgrast_dev_06072011, rast_rel_2008_09_30, before-dynamics-persistence, rast_rel_2008_10_29, rast_rel_2014_0729, mgrast_dev_03252011, mgrast_release_3_0, rast_rel_2010_1206, mgrast_rel_2008_0924, V00-00-08, lwc, mass-spec-01, mgrast_dev_03312011, mass-spec-03, mass-spec-02, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, makeScriptHeaders, rast_rel_2008_07_21, mgrast_rel_2008_0923, mgrast_release_3_0_1, rast_rel_2010_0827, rast_rel_2009_03_26, rast_2008_0924, mgrast_dev_12152011, rast_rel_2010_0526, forRick-14Jul04-0, rast_rel_2008_04_23, caBIG-00-00-00, delong-01, post-st-migration2, mgrast_rel_2008_1110_v2, mgrast_dev_04012011, treatman-lastDay-0, forRick-14Jul04-1, mgrast_rel_2008_1110, post-st-migration, caBIG-13Feb06-00, HEAD
Branch point for: Branch-bobdev_news
Changes since 1.3: +8 -4 lines

Changes to support having RTARCH subdirs under lib, bin and tmp, e.g.,
bin/linux-postgres and tmp/lnux-postgres/MyPackage

#!/bin/sh

########################################################################
# mkworkdir
#
# Makes a work area in which to check out packages, build, test, etc.
# This simply makes a directory, copies a top-level makefile into it from
# the release, and installs a set of directories and a config file assumbed
# by the build tools
#
# Usage:
#    mkworkdir -r <releaseName>  <workDirName>
#
# Assumes:
#    RTROOT is set to point to the root of the release area.  Releases
#    live in $RTROOT/dist/releases
#
# History:
#   01 Dec 03   efrank   First version.  With thanks to Terry Hung and
#                        Bob Jacobsen (newrel in SoftRelTools. SLAC/LBL)
#
########################################################################

#++ params
   # name of the package with release tools
   releasetoolsname=ReleaseTools

#++ vars
   baserelname=current

#-----------------------------------------------------------------------
#++ process options

   set -- `getopt r: $*`
   if [ $? = 0 ]; then
       while [ $1 != -- ]
	 do
	 case $1 in
	     -r) baserelname=$2; shift;;
	 esac
	 shift
       done
       shift
   fi
   

#-----------------------------------------------------------------------
#++ check for correct number of arguments
   if [ "$#" -ne 1 ]; then
       echo "One argument required"
       echo "Usage: mkworkdir -r <releaseName>  <workDirName>"
       exit 2
   fi
   workdirname=$1

#-----------------------------------------------------------------------
#++ Makesure the work directory does not already exist

   if [ -r $workdirname ]; then
       echo $workdirname already exists
       exit 2
   fi

#-----------------------------------------------------------------------
#++ Find Base release

   if [ -z "$RTROOT" ]; then
       echo "No RTROOT set"
       exit 2
   fi

   baserel=$RTROOT/dist/releases/$baserelname

   if [ ! -r "$baserel" ]; then
       echo "No such release: " $baserel
       exit 2
   fi

#-----------------------------------------------------------------------
#++ Make sure the ReleaseTools package is there (to get top level
#   makefiles, etc.).

   if [ ! -r "$baserel/$releasetoolsname" ]; then
       echo "No $releasetoolsname" in the base release
       exit 2
   fi

   releasetools=$baserel/$releasetoolsname


#-----------------------------------------------------------------------
#++ Make sure the top level makefile is there

   if [ ! -r $releasetools/Makefile.top ]; then
       echo "Invalid $releasetools: no top level makefile"
       exit 2
   fi

#-----------------------------------------------------------------------
#++ Make the directory structure

   mkdir $workdirname
   cd $workdirname
   #mkdir bin
   #mkdir bin/$RTARCH
   #mkdir lib
   #mkdir lib/$RTARCH
   #mkdir tmp
   #mkdir tmp/$RTARCH
   #mkdir CGI
   cp -p $releasetools/Makefile.top ./Makefile
   echo "baserelname=$baserelname" > rtConfig
   make installdirs

#-----------------------------------------------------------------------
#++ debug...delete real soon

   echo "baserel     : "  $baserel
   echo "baserelname : "  $baserelname
   echo "releasetools: "  $releasetools 
   echo "workdirname : "  $workdirname

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3