forked from UofG-netlab/gnf-dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildAll.sh
executable file
·33 lines (28 loc) · 958 Bytes
/
buildAll.sh
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
#!/bin/bash
echo "Building docker images....."
CURR_FOLDER=`pwd`
cd base
docker build . -t "glanf/base"
cd $CURR_FOLDER
for folder in $(ls -d *)
do
FOLDER="$CURR_FOLDER/$folder"
if [[ -d $FOLDER ]]; then
if [[ $FOLDER == *"base"* ]]; then
echo "Already built base image..."
else
cd $FOLDER
docker build . -t "glanf/$folder"
fi
fi
cd $CURR_FOLDER
done
echo "-----------------------------------"
echo "Setting .bashrc"
GLANF_FOLDER="$CURR_FOLDER/testing"
echo "export GLANF_HOME=\"$GLANF_FOLDER/\"" >> ~/.bashrc
echo "export PATH=\"$PATH:$GLANF_HOME\"" >> ~/.bashrc
echo "alias glanf_start=\"sudo $GLANF_HOME/glanf start\"" >> ~/.bashrc
echo "alias glanf_stop=\"sudo $GLANF_HOME/glanf stop\"" >> ~/.bashrc
echo "alias glanf_clean=\"sudo $GLANF_HOME/glanf clean\"" >> ~/.bashrc
echo "alias glanf_reset=\"sudo $GLANF_HOME/glanf stop && sudo $GLANF_HOME/glanf clean\"" >> ~/.bashrc