255692bd91bdcd42b18ebd608787de77a23e01eb
[dev-env-setup.git] / hdl-dev-repos
1 #!/bin/bash
2 if [ "$EUID" -ne 0 ]
3 then echo "Please run as root"
4 exit
5 fi
6
7 runuser $SUDO_USER --preserve-environment -c '
8 cd /home/$SUDO_USER
9 mkdir src
10 cd src
11 git clone https://github.com/nmigen/nmigen.git
12 git clone https://git.libre-soc.org/git/nmutil.git
13 git clone https://git.libre-soc.org/git/ieee754fpu.git
14 git clone https://git.libre-soc.org/git/nmigen-soc.git
15 git clone https://git.libre-soc.org/git/soc.git
16 '
17 cd /home/$SUDO_USER/src/nmigen
18 python3 setup.py develop
19 cd ../nmutil
20 python3 setup.py develop
21 cd ../ieee754fpu
22 git submodule update --init --recursive
23 python3 setup.py develop
24 cd ../nmigen-soc
25 python3 setup.py develop
26 cd ../soc
27 git submodule update --init --recursive
28 python3 setup.py develop
29 cd ../
30 chown -R $SUDO_USER .
31 chgrp -R $SUDO_USER .
32 echo -e "
33 \e[1;91mAll Libre-SOC dev dependenices should now be installed.\e[0m
34 "