forked from GENI-NSF/geni-ch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinkamsoil.sh
More file actions
executable file
·38 lines (34 loc) · 840 Bytes
/
linkamsoil.sh
File metadata and controls
executable file
·38 lines (34 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Set up links from CHAPI plugins and tools into the AMSoil deployment
base=$PWD
AMSOIL=$base/AMsoil
CHAPI=$base
if [ -d $AMSOIL ]; then
echo "updating $AMSOIL"
cd $AMSOIL
git pull
cd $base
else
echo "cloning into $AMSOIL"
cd $base
git clone https://github.com/fp7-ofelia/AMsoil.git
fi
cd $base
rm -f $AMSOIL/src/plugins/.gitignore
# hold off on marm for now
for pl in chrm chapiv1rpc sarm marm
do
if [ ! -d $AMSOIL/src/plugins/$pl ]; then
ln -s $CHAPI/plugins/$pl $AMSOIL/src/plugins/$pl
fi
echo $pl >> $AMSOIL/src/plugins/.gitignore
done
if [ ! -d $AMSOIL/src/tools ]; then
ln -s $CHAPI/tools $AMSOIL/src/tools
fi
echo tools > $AMSOIL/src/.gitignore
# Remove unused AMsoil plugins
for pl in dhcprm dhcpgeni3 mailer worker geniv3rpc
do
sudo rm $AMSOIL/src/plugins/$pl
done