[Bio] / ReleaseTools / importrel Repository:
ViewVC logotype

View of /ReleaseTools/importrel

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (annotate)
Mon Dec 22 21:38:03 2003 UTC (15 years, 11 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-07, V00-00-06, V00-00-09, mobedac_release_05302012, V00-00-10, rast_rel_2010_0928, 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, 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.1: +97 -4 lines

auditrel:
	will check integrety of . to see it is a valid release.

importrel:
	importrel -r <releaseName> -h <hostname> imports the release
        into the release area.

#!/bin/sh

########################################################################
#
# Imports a relase from a peer into the release area.  Options:
#
# Usage:
#    importrel -r <releaseName> -h <hostname>
#
#    Finds <releaseName> in release area of <hostname> and copies into
#    our release area.
# 
#    Names should jsut be names like 0.2.3, not full paths
#
# ASSUMES:
#     Assumes you can ssh to the host
#
#
# History:
#    23 Dec 03 efrank    first version
#
# BUGS:
#
########################################################################


#-----------------------------------------------------------------------
#++ vars

newReleaseName=""
hostName=""


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

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


#-----------------------------------------------------------------------
#++ check for correct number of arguments
#
   if [ "$#" -ne 0 ]; then
       echo "Usage: importrel -r <releaseName> -h <hostname>"
       exit 2
   fi

   echo $newReleaseName
   echo $hostName

   if [ x$newReleaseName = "x" ]; then
       echo "You must give a release name"
       exit 2
   fi

   if [ x$hostName = "x" ]; then
       echo "You must give a hostname"
       exit 2
   fi

#-----------------------------------------------------------------------
#++ Sanity check the release

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

   releaseArea=$RTROOT/dist/releases

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

   newRelease=$releaseArea/$newReleaseName

   if [ -r $newRelease ]; then
       echo "Release $newReleaseName already exists in release area, $releaseArea"
       exit 2
   fi

#-----------------------------------------------------------------------
#++ OK, copy it over.

   # Warp us there, Mr. Sulu

   cd $releaseArea
   ssh $hostName "(cd \$RTROOT/dist/releases; tar czf - $newReleaseName)" | tar xzf -


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3