userconfig.sh 1.21 KB
Newer Older
1 2
#!/bin/bash

Christoph Gerum's avatar
Christoph Gerum committed
3 4 5

echo "Running userconfig in  $HOME"

michael's avatar
michael committed
6
cd $HOME
7 8 9 10
ca_dir="${HOME}/parallel_computer_architecture"

mkdir -p $ca_dir
cd $ca_dir
11 12

if [ ! -d gem5 ]; then
13
 hg clone http://repo.gem5.org/gem5-stable gem5
14 15 16 17
fi

cd gem5
hg pull 
michael's avatar
michael committed
18
hg update
michael's avatar
michael committed
19

michael's avatar
michael committed
20 21 22 23
#scons build/ARM/gem5.debug --jobs 2
scons build/ARM/gem5.opt --jobs 2
#scons build/X86/gem5.debug --jobs 2
#scons build/X86/gem5.opt --jobs 2
24

michael's avatar
michael committed
25 26 27 28
cd util/term/
make
echo 'alias m5term="/home/vagrant/gem5/util/term/m5term"' >> /home/vagrant/.bashrc

29
cd $ca_dir
michael's avatar
michael committed
30
mkdir -p system
michael's avatar
michael committed
31 32 33
cd system
wget http://www.gem5.org/dist/current/arm/aarch-system-2014-10.tar.xz

34 35
tar xvJf aarch-system-2014-10.tar.xz

michael's avatar
michael committed
36 37 38 39 40
if [ $? == 0 ]; then
 rm aarch-system-2014-10.tar.xz
fi

cd $HOME
michael's avatar
michael committed
41
echo 'export M5_PATH="/home/vagrant/advanced_computer_architecture/system"' >> .bashrc
michael's avatar
michael committed
42 43
cp -r /vagrant/local_config/ssh/* ~/.ssh

michael's avatar
michael committed
44 45
mkdir -p $ca_dir
cd $ca_dir
46 47 48 49 50 51 52 53 54
if [ ! -d exercises ]; then
  git clone git@atreus.informatik.uni-tuebingen.de:advanced_computer_architecture/exercises.git
  if [ $? -ne 0 ]; then
    echo "Checkout over ssh failed trying https"
    git clone https://atreus.informatik.uni-tuebingen.de/advanced_computer_architecture/exercises.git
  fi
else
  cd exercises
  git pull
Christoph Gerum's avatar
Christoph Gerum committed
55
fi
michael's avatar
michael committed
56
/vagrant/local_config/local_bootstrap.sh