head	1.7;
access;
symbols
	charm6_1:1.7
	charm_6_0_1:1.7
	charm6_0_1:1.7
	charm6_0:1.7
	ChaNGa_1-0:1.7
	charm5_9:1.7
	charm_5-4-2:1.6
	charm_5-4-1:1.6
	pre-winnt-version:1.1
	charm500:1.1
	charm499:1.1;
locks; strict;
comment	@# @;


1.7
date	2003.10.29.22.00.01;	author gzheng;	state Exp;
branches;
next	1.6;

1.6
date	2001.01.29.21.30.26;	author olawlor;	state Exp;
branches;
next	1.5;

1.5
date	2000.12.13.04.33.07;	author olawlor;	state Exp;
branches;
next	1.4;

1.4
date	2000.09.18.14.16.23;	author gzheng;	state Exp;
branches;
next	1.3;

1.3
date	2000.09.08.22.03.37;	author olawlor;	state Exp;
branches;
next	1.2;

1.2
date	2000.09.01.17.58.08;	author milind;	state Exp;
branches;
next	1.1;

1.1
date	97.07.30.19.58.02;	author jyelon;	state Exp;
branches;
next	;


desc
@@


1.7
log
@removed teh rules in Makefile for compiling daemon.
also in gathertree, if there is a gather.tree in source dir, gather.tree will be invoked too.
@
text
@#!/bin/sh

SRC=$1
DST=$2

[ ! -d $SRC ] && exit 0;

# remove all temporary files
rm -f temp.d temp.f temp.m temp.l tmp*.awk
# find all directories including and below SRC
(cd $SRC ; find . -name CVS -prune -o -type d -print )|sed -e s@@.@@@@> temp.d
# find all files below SRC
(cd $SRC ; find . -name CVS -prune -o -type f -print )|sed -e s@@.@@@@> temp.f
# generate shell script to make directories if they do not exist
awk '{print "if [ ! -d '$DST'"$1" ] ; then mkdir '$DST'"$1" ; fi";}' <temp.d >temp.m
# generate shell script to symlink files
# Count the number of directories up we have to go; print out list
echo '{ nUp=0; for (i=1;i<NF;i++)
		if ($i=="..") nUp--;
		else if ($i!=".")nUp++;
	pah=""; for (i=0;i<nUp;i++) {pah=pah"../"}; print pah
} ' > tmp1.awk
echo '{print "pah=`echo '$DST'"$1" | awk -F/ -f tmp1.awk`" ;' > tmp2.awk
echo ' print "./system_ln $pah'$SRC'"$1" '$DST'"$1 }' >> tmp2.awk
awk -f tmp2.awk <temp.f >temp.l
# execute shell script to create directories
sh temp.m
# execute shell script to link files 
sh temp.l
[ -f $SRC/gather.tree ] && sh $SRC/gather.tree
# remove temporary files
rm -f temp.d temp.f temp.m temp.l tmp*.awk
@


1.6
log
@Use "system_ln" command instead of "ln -s".
On win32, "system_ln" is actually "cp -f".
@
text
@d30 1
d32 1
a32 1
# rm -f temp.d temp.f temp.m temp.l tmp*.awk
@


1.5
log
@Added -f to "ln" calls, which allows, e.g., mpi-sp/charmrun
to overwrite Common.mpi/charmrun.
@
text
@d24 1
a24 1
echo ' print "ln -f -s $pah'$SRC'"$1" '$DST'"$1 }' >> tmp2.awk
@


1.4
log
@test if SRC dir exists, otherwise exit normally.
@
text
@d24 1
a24 1
echo ' print "ln -s $pah'$SRC'"$1" '$DST'"$1 }' >> tmp2.awk
@


1.3
log
@Made soft links use relative pathnames instead of absolute.
This lets you move a charm++ installation without having
to recompile anything.

It also stops the confusing oddness that happens when you
move, e.g., charm to old_charm, and install a new charm.
Then the old_charm (absolute) soft links point into the
new charm directory!
@
text
@d6 2
@


1.2
log
@Added code to check directories before issuing the mkdir command.
@
text
@d3 1
a3 1
SRC=`(cd $1 ; pwd)`
d7 1
a7 1
rm -f temp.d temp.f temp.m temp.l
d15 9
a23 1
awk '{print "ln -s '$SRC'"$1" '$DST'"$1;}' <temp.f >temp.l
d29 1
a29 1
rm -f temp.d temp.f temp.m temp.l
@


1.1
log
@*** empty log message ***
@
text
@d6 1
d8 1
d10 1
d12 5
a16 2
awk '{print "mkdir '$DST'"$1;}' < temp.d > temp.m
awk '{print "ln -s '$SRC'"$1" '$DST'"$1;}' < temp.f > temp.l
d18 1
d20 1
@

