head	1.34;
access;
symbols
	TIGRIS_0_9_0:1.33.0.6
	TIGRIS_0_8_4:1.33.0.4
	TIGRIS_710_FF:1.33
	TIGRIS_706:1.33
	TIGRIS_705:1.33
	TIGRIS_704:1.33
	TIGRIS_703:1.33
	TIGRIS_702:1.33
	TIGRIS_701:1.33
	TIGRIS_SEP_13_2000:1.33.0.2
	TIGRIS_BASELINE:1.33;
locks; strict;
comment	@# @;


1.34
date	2001.01.10.18.13.43;	author stack;	state dead;
branches;
next	1.33;

1.33
date	2000.08.22.19.35.47;	author ed;	state Exp;
branches;
next	1.32;

1.32
date	2000.08.22.18.43.02;	author jrobbins;	state Exp;
branches;
next	1.31;

1.31
date	2000.08.02.22.36.57;	author dlr;	state Exp;
branches;
next	1.30;

1.30
date	2000.08.02.19.01.29;	author davidp;	state Exp;
branches;
next	1.29;

1.29
date	2000.07.26.21.09.00;	author ed;	state Exp;
branches;
next	1.28;

1.28
date	2000.07.26.02.05.36;	author dlr;	state Exp;
branches;
next	1.27;

1.27
date	2000.07.25.23.10.04;	author kmaples;	state Exp;
branches;
next	1.26;

1.26
date	2000.07.16.06.06.32;	author jrobbins;	state Exp;
branches;
next	1.25;

1.25
date	2000.07.16.05.44.03;	author jrobbins;	state Exp;
branches;
next	1.24;

1.24
date	2000.07.14.16.34.10;	author jrobbins;	state Exp;
branches;
next	1.23;

1.23
date	2000.07.13.21.21.40;	author dlr;	state Exp;
branches;
next	1.22;

1.22
date	2000.07.13.04.20.55;	author dlr;	state Exp;
branches;
next	1.21;

1.21
date	2000.07.12.19.32.36;	author jon;	state Exp;
branches;
next	1.20;

1.20
date	2000.07.12.18.15.03;	author jon;	state Exp;
branches;
next	1.19;

1.19
date	2000.07.12.04.48.49;	author jrobbins;	state Exp;
branches;
next	1.18;

1.18
date	2000.07.12.02.45.46;	author dlr;	state Exp;
branches;
next	1.17;

1.17
date	2000.07.12.02.05.16;	author jrobbins;	state Exp;
branches;
next	1.16;

1.16
date	2000.07.11.23.55.43;	author ryan;	state Exp;
branches;
next	1.15;

1.15
date	2000.07.11.21.30.34;	author dlr;	state Exp;
branches;
next	1.14;

1.14
date	2000.07.11.07.52.42;	author davidp;	state Exp;
branches;
next	1.13;

1.13
date	2000.07.07.20.40.13;	author dlr;	state Exp;
branches;
next	1.12;

1.12
date	2000.07.07.20.36.49;	author dlr;	state Exp;
branches;
next	1.11;

1.11
date	2000.07.06.04.58.20;	author ryan;	state Exp;
branches;
next	1.10;

1.10
date	2000.07.06.00.44.16;	author elicia;	state Exp;
branches;
next	1.9;

1.9
date	2000.06.22.23.15.29;	author davidp;	state Exp;
branches;
next	1.8;

1.8
date	2000.06.10.00.46.58;	author chuck;	state Exp;
branches;
next	1.7;

1.7
date	2000.06.06.08.43.51;	author davidp;	state Exp;
branches;
next	1.6;

1.6
date	2000.06.06.08.24.15;	author davidp;	state Exp;
branches;
next	1.5;

1.5
date	2000.06.03.05.59.20;	author davidp;	state Exp;
branches;
next	1.4;

1.4
date	2000.05.13.02.02.26;	author ed;	state Exp;
branches;
next	1.3;

1.3
date	2000.04.20.01.10.16;	author manoj;	state Exp;
branches;
next	1.2;

1.2
date	2000.04.10.23.30.35;	author davidp;	state Exp;
branches;
next	1.1;

1.1
date	2000.04.07.17.48.21;	author jrobbins;	state Exp;
branches;
next	;


desc
@@


1.34
log
@No longer used.  Marked deprecated w/ months
@
text
@#!/bin/bash
# move_sandbox: Preprocesses '.in' files based on environment variables.
# usage: move_sandbox [sandbox directory]
#
# $Id: move_sandbox,v 1.33 2000/08/22 19:35:47 ed Exp $

echo '******************** WARNING ********************************'
echo 'move_sandbox is deprecated. configure.pl is now the script to set up'
echo 'a sandbox after sourcing env.sh.'
echo '*************************************************************'

if [ -d ${SANDBOX} ] && [ -x ${SANDBOX}/scripts/configure.pl ] ; then
    echo "found SANDBOX ($SANDBOX); running ${SANDBOX}/scripts/configure.pl now"
    exec "${SANDBOX}/scripts/configure.pl" $*
    exit 0;
else 
    echo "unable to find a valid SANDBOX in env; please edit & source env.sh"
    exit 1;
fi

@


1.33
log
@move_sandbox is now deprecated; warn about that and exec configure.pl
with whatever command line arguments were provided.  also -- make sure
configure.pl warns about the -b option (also deprecated), in case it's
used while STANDARD_PORTS is defined.  try to make warning message stick
out.
@
text
@d5 1
a5 1
# $Id: move_sandbox,v 1.32 2000/08/22 18:43:02 jrobbins Exp $
@


1.32
log
@followed through on someone elses addition of DATABAE_PORT
@
text
@d1 1
a1 1
#!/bin/sh
d5 1
a5 1
# $Id: move_sandbox,v 1.31 2000/08/02 22:36:57 dlr Exp $
d7 12
a18 32

# Sanity check.
if [ ${#SANDBOX} = '0' ] ; then
    echo 'Set the SANDBOX env var to the base directory of your sandbox'
    exit 1
fi

getopts b option
if [ $option = 'b' ] ; then
    apache_port=80
    ssl_port=443
    jserv_port=8007
else
    apache_port=$((8000 + $UID))
    ssl_port=$((12000 + $UID))
    jserv_port=$((10000 + $UID))
fi


# Assure all the necessary environment variables exist and 
# complain if they don't.  This should help in debugging
# problems during upgrades between versions as well as new
# installations.
#
# NOTE: Variables added to the perl regex should have a matching 
#       variable added to the CONF_VARS list in the env.sh script.
ENV_CHECK=${SANDBOX}/scripts/env_check
if [ -x $ENV_CHECK ]; then 
    $ENV_CHECK
else
    echo "Unable to run '$ENV_CHECK' to verify sandbox env"
    exit 1
a20 33
for f in `find ${1:-$SANDBOX} -type f -regex '.+\.in$' | sed 's/\.in$//'` ; do
    if [ -e $f ] ; then
        mv -f $f ${f}.old
    fi
    cp ${f}.in $f
    perl -p -i.in \
        -e "s#__BRAND__#$BRAND#g;" \
        -e "s#__BRANDSITE__#$BRANDSITE#g;" \
        -e "s#__SANDBOX__#$SANDBOX#g;" \
        -e "s#__HOSTNAME__#$HOSTNAME#g;" \
        -e "s#__USE_COOKED_TEMPLATES__#$USE_COOKED_TEMPLATES#g;" \
        -e "s|__IF_GATED__|$IF_GATED|g;" \
        -e "s#__SERVLET_TEMPLATE_ROOT__#$SERVLET_TEMPLATE_ROOT#g;" \
        -e "s#__BRAND_TEMPLATE_ROOT__#$BRAND_TEMPLATE_ROOT#g;" \
        -e "s#__HTDOC_ROOT__#$HTDOC_ROOT#g;" \
        -e "s#__DOMAIN__#$DOMAIN#g;" \
        -e "s#__MAIL_HOST__#$MAIL_HOST#g;" \
        -e "s#__MAIL_LIST__#$MAIL_LIST#g;" \
        -e "s#__MAIL_ACCOUNT__#$MAIL_ACCOUNT#g;" \
        -e "s#__DATABASE_HOST__#$DATABASE_HOST#g;" \
        -e "s#__DATABASE_NAME__#$DATABASE_NAME#g;" \
        -e "s#__DATABASE_USER__#$DATABASE_USER#g;" \
        -e "s#__DATABASE_PASSWORD__#$DATABASE_PASSWORD#g;" \
        -e "s#__DATABASE_PORT__#$DATABASE_PORT#g;" \
        -e "s#__APACHE_PORT__#$apache_port#g;" \
        -e "s#__SSL_PORT__#$ssl_port#g;" \
        -e "s#__JSERV_PORT__#$jserv_port#g;" \
        -e "s#__MAIL_ROOT__#$MAIL_ROOT#g;" \
	$f
done
unset f

exit 0
@


1.31
log
@Added usage comment.
@
text
@d5 1
a5 1
# $Id: move_sandbox,v 1.30 2000/08/02 19:01:29 davidp Exp $
d64 1
@


1.30
log
@Allowed for specifying the target directory, defaulting to $SANDBOX
@
text
@d3 3
a5 1
# $Id: move_sandbox,v 1.29 2000/07/26 21:09:00 ed Exp $
@


1.29
log
@add __MAIL_ROOT__ token.
@
text
@d3 1
a3 1
# $Id: move_sandbox,v 1.28 2000/07/26 02:05:36 dlr Exp $
d23 1
d39 1
a39 1
for f in `find $SANDBOX -type f -regex '.+\.in$' | sed 's/\.in$//'` ; do
@


1.28
log
@Reworked to handle the running of the env_check script from anywhere.
@
text
@d3 1
a3 1
# $Id: move_sandbox,v 1.27 2000/07/25 23:10:04 kmaples Exp $
d64 1
@


1.27
log
@Forced changing of directories to ${SANDBOX}/scripts/ before executing env_check (which in turn requires that env.sh be in the current directory); fixes condition where env_check was essentially not being run without any significant error being generated.
@
text
@d3 1
a3 1
# $Id: $
d30 3
a32 10
if [ -x ${SANDBOX}/scripts/env_check ]; then 
    # NOTE: env_check looks in the current directory for env.sh, so
    # to ensure that we know where we're executing from, go there
    # and back:

    old_dir=`pwd`
    cd ${SANDBOX}/scripts/
    ${SANDBOX}/scripts/env_check
    cd ${old_dir}
    unset old_dir
d34 2
a35 1
    echo "WARNING: Unable to run ${SANDBOX}/scripts/env_check ... "
d67 2
@


1.26
log
@corrected typo
@
text
@d3 2
d30 13
a42 1
${SANDBOX}/scripts/env_check
@


1.25
log
@hash is a bad delemiter for variables that can contain a hash
@
text
@d41 1
a41 1
        -e "s|__IF_GATED__#$|F_GATED|g;" \
@


1.24
log
@added IF_GATED
@
text
@d41 1
a41 1
        -e "s#__IF_GATED__#$IF_GATED#g;" \
@


1.23
log
@Modified env_check (called by move_sandbox) to be slightly more dynamic by parsing env.sh for the names of the prerequisite variables.  Modified other files accordingly.
@
text
@d41 1
@


1.22
log
@Added USE_COOKED_TEMPLATES variable.
@
text
@d21 7
a27 7
## check to make sure all the environment variables exist
## and complain if they don't. this should help in debugging
## problems during upgrades between versions as well as new
## installations.
##
## NOTE: if you add something below to the perl regex, you
##       should also add it to the env_check script
@


1.21
log
@SITE_ROOT is not used any longer
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d40 1
@


1.20
log
@added execution of env_check script to make sure that all the necessary
env variables are set properly.
@
text
@a38 1
        -e "s#__SITE_ROOT__#$SANDBOX/site#g;" \
@


1.19
log
@Got rid of $BUILD_ROOT...it snuck in somehow two commits ago.
@
text
@d21 9
@


1.18
log
@Got rid of the fucking tab.
@
text
@d21 1
a21 1
for f in `find $BUILD_ROOT/$SANDBOX -type f -regex '.+\.in$' | sed 's/\.in$//'` ; do
@


1.17
log
@Added HTDOC_ROOT subst.
@
text
@d34 1
a34 1
	-e "s#__HTDOC_ROOT__#$HTDOC_ROOT#g;" \
@


1.16
log
@factored out some modifications npm made to netbeans. __HOSTNAME__ is now set by env.sh, we added __BRANDSITE__ wich is a word mark for the brand.
@
text
@d34 1
@


1.15
log
@Now matches files whose names start with '.'
@
text
@d27 2
d31 1
a33 1
        -e "s#__HOSTNAME__#`hostname`#g;" \
@


1.14
log
@Added SERVLET_TEMPLATE_ROOT and BRAND_TEMPLATE_ROOT
@
text
@d21 1
a21 1
for f in `find $BUILD_ROOT/$SANDBOX -type f -name \*.in | sed 's/\.in$//'` ; do
@


1.13
log
@More comments, minor tweaks.
@
text
@d29 2
@


1.12
log
@Added comment.
@
text
@d2 1
d5 1
a5 1
if [ ${#SANDBOX} = "0" ] ; then
d11 1
a11 1
if [ $option = "b" ] ; then
@


1.11
log
@Changed loop variable from i to f since it represents a file.  Removed sourcex_html and SOURCEX_HTML token--will factor this out of any content tomorrow.  Added HOSTNAME token for dynamic configuration of the host name.  Will probably want to add some logic to this to allow installer to specify an alternate name.
@
text
@d3 1
d5 1
a5 1
    echo "Set the SANDBOX envar to the base directory of your sandbox"
d8 1
a9 1

d28 1
a39 1
        -e "s#__HOSTNAME__#`hostname`#g;" \
@


1.10
log
@added SITE ROOT variable
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d19 3
a21 5
sourcex_html='/org/sourcexchange'

for i in `find $BUILD_ROOT/$SANDBOX -type f -name \*.in | sed 's/\.in$//'` ; do
    if [ -e $i ] ; then
        mv -f $i $i.old
d23 1
a23 1
    cp $i.in $i
d38 2
a39 1
        -e "s#__SOURCEX_HTML__#$sourcex_html#g;" $i
d41 1
a41 1

@


1.9
log
@Support for sandbox-specific ssl (https) ports.
@
text
@d28 1
@


1.8
log
@total short term hack for SOURCEX_HTML
@
text
@d11 1
d15 1
d37 1
@


1.7
log
@Added __MAIL_LIST__ and __MAIL_ACCOUNT__
@
text
@d17 2
d35 2
a36 1
        -e "s#__JSERV_PORT__#$jserv_port#g;" $i
@


1.6
log
@Added __MAIL_HOST__
@
text
@d26 2
@


1.5
log
@Added replacement strings for dealing with the database.
@
text
@d25 1
@


1.4
log
@force backup during rpm build
PR:
Obtained from:
Submitted by:
Reviewed by:	manoj@@collab.net
@
text
@d24 7
a30 2
        -e "s/__APACHE_PORT__/$apache_port/g;" \
        -e "s/__JSERV_PORT__/$jserv_port/g;" $i
@


1.3
log
@Allow move_sandbox to be used in an RPM build process.
@
text
@d19 1
a19 1
        mv $i $i.old
@


1.2
log
@Reference the $SANDBOX env var instead of assuming .
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d17 1
a17 1
for i in `find $SANDBOX -type f -name \*.in | sed 's/\.in$//'` ; do
@


1.1
log
@guarded mv command so that it will work even on first run after a checkout
without an error message
@
text
@d17 1
a17 1
for i in `find . -type f -name \*.in | sed 's/\.in$//'` ; do
@

