4 echo "Copying stuff from skeleton"
6 for f
in $
(ls -A /vagrant
/skel
)
8 target
="/home/vagrant/$f"
11 echo "$target already there"
13 echo "Copying $target from skeleton"
14 cp -r "/vagrant/skel/$f" $target
18 OFDIR
=/home
/vagrant
/OpenFOAM
/
21 chown
-R vagrant
:vagrant
$OFDIR
23 OFClone
=$OFDIR/OpenFOAM-1.6
-ext
24 OFReference
=$OFDIR/OpenFOAM-1.6
-ext-parent
26 OFParent
=/OpenFOAM-sources
31 echo "Cloning the OF-sources"
33 if [ -e "$OFParent/.git" ]
38 su vagrant
- -c "git clone $OFParent $OFClone"
40 echo "Git cloned: TODO: set same branch as parent"
42 elif [ -e "$OFParent/.hg" ]
45 echo "Parent is mercurial. Hello Bernhard"
47 branchName
=`hg branch -R $OFParent`
49 echo "Parent is on branch $branchName"
50 su vagrant
- -c "hg clone -u $branchName $OFParent $OFClone"
54 echo "Problem. Parent $OFParent is neither git nor mercurial"
58 echo "Repository $OFClone already there. No cloning"
61 if [ ! -e $OFReference ]
64 echo "Linking $OFReference to $OFParent"
66 ln -s $OFParent $OFReference
69 echo "Link $OFReference already there"
73 chown
-R vagrant
:vagrant
$OFDIR
76 echo "Current ccache:"
77 export CCACHE_DIR
=/vagrant
/ccache4vm
; ccache
--show-stats